diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 1c67980b..2208d43d 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -2842,6 +2842,9 @@ static void EnsureInputDisplayUpdated() WinRefreshDisplay(); } +DWORD guiUpdateFrequency = 50; +DWORD lastGUIUpdateTime = 0; + // for "frame advance skips non-input frames" feature void S9xOnSNESPadRead() { @@ -2876,6 +2879,14 @@ void S9xOnSNESPadRead() TranslateMessage (&msg); DispatchMessage (&msg); } + + DWORD lastTime = timeGetTime(); + if (lastTime - lastGUIUpdateTime >= guiUpdateFrequency) + { + UpdateToolWindows(); + InvalidateRect(GUI.hWnd, NULL, FALSE); + lastGUIUpdateTime = lastTime; + } } } @@ -3381,6 +3392,13 @@ int WINAPI WinMain( DispatchMessage (&msg); } + DWORD lastTime = timeGetTime(); + if (lastTime - lastGUIUpdateTime >= guiUpdateFrequency) { + UpdateToolWindows(); + InvalidateRect(GUI.hWnd, NULL, FALSE); + lastGUIUpdateTime = lastTime; + } + S9xSetSoundMute(GUI.Mute || Settings.ForcedPause || (Settings.Paused && (!Settings.FrameAdvance || GUI.FAMute))); }