From 893c719ef4938913917e0c31259df5d8062f41a0 Mon Sep 17 00:00:00 2001 From: Alias Letterman Date: Mon, 11 Feb 2019 12:30:32 -0600 Subject: [PATCH] win32: Process input after waiting for SoundSync. --- win32/wsnes9x.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 1a9c5416..5fed8688 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -3455,14 +3455,14 @@ int WINAPI WinMain( if(run_loop) { - ProcessInput(); - - // no sound sync when speed is not set to 100% - while(!S9xSyncSound()) { + // no sound sync when speed is not set to 100% + while (!S9xSyncSound()) { ResetEvent(GUI.SoundSyncEvent); - if(!PCFrameTimeIsDefault || WaitForSingleObject(GUI.SoundSyncEvent,1000) != WAIT_OBJECT_0) + if (!PCFrameTimeIsDefault || WaitForSingleObject(GUI.SoundSyncEvent, 1000) != WAIT_OBJECT_0) S9xClearSamples(); - } + } + + ProcessInput(); if(GUI.rewindBufferSize #ifdef NETPLAY_SUPPORT