From 21153c899ba007b83891c3df420fcb3c311cdf81 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 3 Jun 2017 14:45:44 -0700 Subject: [PATCH] GE Debugger: Oops, don't record if not active. In case the debugger is open but not recording, oops. --- GPU/Debugger/Record.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/GPU/Debugger/Record.cpp b/GPU/Debugger/Record.cpp index d35676cda7..915c81c988 100644 --- a/GPU/Debugger/Record.cpp +++ b/GPU/Debugger/Record.cpp @@ -338,6 +338,10 @@ bool IsActive() { } void NotifyCommand(u32 pc) { + if (!active) { + return; + } + const u32 op = Memory::Read_U32(pc); const GECommand cmd = GECommand(op >> 24); @@ -387,6 +391,9 @@ void NotifyCommand(u32 pc) { } void NotifyMemcpy(u32 dest, u32 src, u32 sz) { + if (!active) { + return; + } if (Memory::IsVRAMAddress(dest)) { FlushRegisters(); Command cmd{CommandType::MEMCPYDEST, sizeof(dest), (u32)pushbuf.size()}; @@ -399,6 +406,9 @@ void NotifyMemcpy(u32 dest, u32 src, u32 sz) { } void NotifyMemset(u32 dest, int v, u32 sz) { + if (!active) { + return; + } struct MemsetCommand { u32 dest; int value; @@ -417,6 +427,9 @@ void NotifyMemset(u32 dest, int v, u32 sz) { } void NotifyUpload(u32 dest, u32 sz) { + if (!active) { + return; + } NotifyMemcpy(dest, dest, sz); }