Debugger: Close all debugger windows when emulation is stopped (prevents crashes)

This commit is contained in:
Souryo 2017-10-05 21:40:25 -04:00
parent 2f20ab5092
commit 5ab04aa00b
4 changed files with 9 additions and 1 deletions

View file

@ -488,6 +488,7 @@ void Console::Run()
_runLock.Release();
MessageManager::SendNotification(ConsoleNotificationType::GameStopped);
MessageManager::SendNotification(ConsoleNotificationType::EmulationStopped);
}
bool Console::IsRunning()

View file

@ -20,8 +20,8 @@ enum class ConsoleNotificationType
ConfigChanged = 14,
DisconnectedFromServer = 15,
PpuViewerDisplayFrame = 16,
ExecuteShortcut = 17,
EmulationStopped = 18,
};
class INotificationListener

View file

@ -473,6 +473,12 @@ namespace Mesen.GUI.Forms
}));
break;
case InteropEmu.ConsoleNotificationType.EmulationStopped:
this.Invoke((Action)(() => {
DebugWindowManager.CloseAll();
}));
break;
case InteropEmu.ConsoleNotificationType.ResolutionChanged:
this.BeginInvoke((MethodInvoker)(() => {
UpdateViewerSize();

View file

@ -800,6 +800,7 @@ namespace Mesen.GUI
DisconnectedFromServer = 15,
PpuViewerDisplayFrame = 16,
ExecuteShortcut = 17,
EmulationStopped = 18,
}
public enum ControllerType