diff --git a/Core/Console.cpp b/Core/Console.cpp index ea652395..bc63457f 100644 --- a/Core/Console.cpp +++ b/Core/Console.cpp @@ -325,11 +325,17 @@ void Console::Run() _runLock.Release(); PlatformUtilities::EnableScreensaver(); - while(paused && !_stop) { + while(paused && !_stop && _debugger == nullptr) { //Sleep until emulation is resumed std::this_thread::sleep_for(std::chrono::duration(100)); paused = EmulationSettings::IsPaused(); } + + if(_debugger != nullptr) { + //Prevent pausing when debugger is active + EmulationSettings::ClearFlags(EmulationFlags::Paused); + } + PlatformUtilities::DisableScreensaver(); _runLock.Acquire(); MessageManager::SendNotification(ConsoleNotificationType::GameResumed); diff --git a/GUI.NET/Forms/frmMain.cs b/GUI.NET/Forms/frmMain.cs index e68f5d44..60258809 100644 --- a/GUI.NET/Forms/frmMain.cs +++ b/GUI.NET/Forms/frmMain.cs @@ -562,6 +562,9 @@ namespace Mesen.GUI.Forms mnuSaveState.Enabled = (_emuThread != null && !isNetPlayClient && !InteropEmu.IsNsf()); mnuLoadState.Enabled = (_emuThread != null && !isNetPlayClient && !InteropEmu.IsNsf() && !InteropEmu.MoviePlaying() && !InteropEmu.MovieRecording()); + //Disable pause when debugger is running + mnuPause.Enabled &= !InteropEmu.DebugIsDebuggerRunning(); + mnuPause.Text = InteropEmu.IsPaused() ? ResourceHelper.GetMessage("Resume") : ResourceHelper.GetMessage("Pause"); mnuPause.Image = InteropEmu.IsPaused() ? Mesen.GUI.Properties.Resources.Play : Mesen.GUI.Properties.Resources.Pause;