mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-23 17:19:39 +00:00
Debugger: Disabled pause when in debugger - fixes deadlocks
This commit is contained in:
parent
33385e7996
commit
666dc14043
@ -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<int, std::milli>(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);
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user