From a39aa6ba95d8f5142b9f22cfe538dbc13d38a4a6 Mon Sep 17 00:00:00 2001 From: wcko87 Date: Thu, 4 May 2017 17:51:46 +0800 Subject: [PATCH] Display memory read count in frame counter --- rabi_splitter_WPF/RabiRibiDisplay.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rabi_splitter_WPF/RabiRibiDisplay.cs b/rabi_splitter_WPF/RabiRibiDisplay.cs index f6313ec..faf6bdf 100644 --- a/rabi_splitter_WPF/RabiRibiDisplay.cs +++ b/rabi_splitter_WPF/RabiRibiDisplay.cs @@ -23,6 +23,9 @@ namespace rabi_splitter_WPF private MemorySnapshot prevSnapshot; private MemorySnapshot snapshot; + // internal frame counter. + private int memoryReadCount; + private string[] datastrings; @@ -32,11 +35,14 @@ namespace rabi_splitter_WPF this.mainContext = mainContext; this.debugContext = debugContext; this.mainWindow = mainWindow; + this.memoryReadCount = 0; StartNewGame(); } public void ReadMemory(Process process) { + ++memoryReadCount; + // Snapshot Game Memory snapshot = new MemorySnapshot(process, mainContext.veridx); @@ -244,7 +250,7 @@ namespace rabi_splitter_WPF private void DebugLog(string log) { - this.debugContext.Log(log); + this.debugContext.Log($"[ {memoryReadCount:D8}] {log}"); } private void sendsplit()