mirror of
https://github.com/libretro/Mesen.git
synced 2025-02-22 01:20:55 +00:00
Debugger: Fixed "refresh on pause/break" logic when debugger window is not opened
This commit is contained in:
parent
ed2cef21c0
commit
22300854f5
@ -63,16 +63,23 @@ namespace Mesen.GUI.Debugger
|
||||
|
||||
private void _notifListener_OnNotification(InteropEmu.NotificationEventArgs e)
|
||||
{
|
||||
if(e.NotificationType == InteropEmu.ConsoleNotificationType.CodeBreak && ConfigManager.Config.DebugInfo.EventViewerRefreshOnBreak) {
|
||||
this.GetData();
|
||||
this.BeginInvoke((MethodInvoker)(() => this.RefreshViewer()));
|
||||
} else if(e.NotificationType == InteropEmu.ConsoleNotificationType.EventViewerDisplayFrame) {
|
||||
if(!_refreshing && (DateTime.Now - _lastUpdate).Milliseconds >= 32) {
|
||||
//Update at ~30 fps at most
|
||||
this.GetData();
|
||||
this.BeginInvoke((MethodInvoker)(() => this.RefreshViewer()));
|
||||
_lastUpdate = DateTime.Now;
|
||||
}
|
||||
switch(e.NotificationType) {
|
||||
case InteropEmu.ConsoleNotificationType.CodeBreak:
|
||||
case InteropEmu.ConsoleNotificationType.GamePaused:
|
||||
if(ConfigManager.Config.DebugInfo.EventViewerRefreshOnBreak) {
|
||||
this.GetData();
|
||||
this.BeginInvoke((MethodInvoker)(() => this.RefreshViewer()));
|
||||
}
|
||||
break;
|
||||
|
||||
case InteropEmu.ConsoleNotificationType.EventViewerDisplayFrame:
|
||||
if(!_refreshing && (DateTime.Now - _lastUpdate).Milliseconds >= 32) {
|
||||
//Update at ~30 fps at most
|
||||
this.GetData();
|
||||
this.BeginInvoke((MethodInvoker)(() => this.RefreshViewer()));
|
||||
_lastUpdate = DateTime.Now;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,16 +71,28 @@ namespace Mesen.GUI.Debugger
|
||||
|
||||
private void _notifListener_OnNotification(InteropEmu.NotificationEventArgs e)
|
||||
{
|
||||
if(e.NotificationType == InteropEmu.ConsoleNotificationType.CodeBreak && ConfigManager.Config.DebugInfo.PpuRefreshOnBreak) {
|
||||
this.GetData();
|
||||
this.BeginInvoke((MethodInvoker)(() => this.RefreshViewers()));
|
||||
} else if(e.NotificationType == InteropEmu.ConsoleNotificationType.PpuViewerDisplayFrame) {
|
||||
if(ConfigManager.Config.DebugInfo.PpuAutoRefresh && !_refreshing && (DateTime.Now - _lastUpdate).Milliseconds > 66) {
|
||||
//Update at 15 fps most
|
||||
this.GetData();
|
||||
this.BeginInvoke((MethodInvoker)(() => this.RefreshViewers()));
|
||||
_lastUpdate = DateTime.Now;
|
||||
}
|
||||
switch(e.NotificationType) {
|
||||
case InteropEmu.ConsoleNotificationType.CodeBreak:
|
||||
case InteropEmu.ConsoleNotificationType.GamePaused:
|
||||
if(ConfigManager.Config.DebugInfo.PpuRefreshOnBreak) {
|
||||
this.GetData();
|
||||
this.BeginInvoke((MethodInvoker)(() => this.RefreshViewers()));
|
||||
}
|
||||
break;
|
||||
|
||||
case InteropEmu.ConsoleNotificationType.PpuViewerDisplayFrame:
|
||||
if(ConfigManager.Config.DebugInfo.PpuAutoRefresh && !_refreshing && (DateTime.Now - _lastUpdate).Milliseconds > 66) {
|
||||
//Update at 15 fps most
|
||||
this.GetData();
|
||||
this.BeginInvoke((MethodInvoker)(() => this.RefreshViewers()));
|
||||
_lastUpdate = DateTime.Now;
|
||||
}
|
||||
break;
|
||||
|
||||
case InteropEmu.ConsoleNotificationType.GameLoaded:
|
||||
//Configuration is lost when debugger is restarted (when switching game or power cycling)
|
||||
InteropEmu.DebugSetPpuViewerScanlineCycle(ConfigManager.Config.DebugInfo.PpuDisplayScanline, ConfigManager.Config.DebugInfo.PpuDisplayCycle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user