From 5066c895703f5e6ebe3d4404c6f9348d6ff680a4 Mon Sep 17 00:00:00 2001 From: Souryo Date: Tue, 3 Oct 2017 18:18:29 -0400 Subject: [PATCH] UI: Fixed issue with game selection screen getting activated by keypresses when game is paused --- Core/Console.cpp | 7 ++++++- Core/Console.h | 1 + Core/Debugger.cpp | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Core/Console.cpp b/Core/Console.cpp index c51c36fe..31b0f406 100644 --- a/Core/Console.cpp +++ b/Core/Console.cpp @@ -484,7 +484,12 @@ void Console::Run() bool Console::IsRunning() { - return !Instance->_stopLock.IsFree() && !Instance->_runLock.IsFree(); + return !Instance->_stopLock.IsFree(); +} + +bool Console::IsPaused() +{ + return _runLock.IsFree(); } void Console::UpdateNesModel(bool sendNotification) diff --git a/Core/Console.h b/Core/Console.h index 5b735bcb..7e8011a0 100644 --- a/Core/Console.h +++ b/Core/Console.h @@ -101,6 +101,7 @@ class Console static void ResetLagCounter(); static bool IsRunning(); + bool IsPaused(); static void SetNextFrameOverclockStatus(bool disabled); diff --git a/Core/Debugger.cpp b/Core/Debugger.cpp index 93900603..107f9023 100644 --- a/Core/Debugger.cpp +++ b/Core/Debugger.cpp @@ -887,7 +887,7 @@ shared_ptr Debugger::GetMemoryAccessCounter() bool Debugger::IsExecutionStopped() { - return _executionStopped || !_console->IsRunning(); + return _executionStopped || _console->IsPaused(); } void Debugger::GetAbsoluteAddressAndType(uint32_t relativeAddr, AddressTypeInfo* info)