possibly fixing a bug where frame advance can run out of control sometimes, and disabling a throttle setting that didn't seem to add much

This commit is contained in:
nitsuja 2009-11-04 11:31:45 +00:00
parent b117ca793d
commit b8625a6f20
2 changed files with 9 additions and 1 deletions

View File

@ -1630,6 +1630,12 @@ static void StepRunLoop_Throttle(bool allowSleep = true, int forceFrameSkip = -1
SPU_Pause(1); SPU_Pause(1);
} }
ServiceDisplayThreadInvocations(); ServiceDisplayThreadInvocations();
if(execute && emu_paused && !frameAdvance)
{
// safety net against running out of control in case this ever happens.
Unpause(); Pause();
}
} }
DWORD WINAPI run() DWORD WINAPI run()
@ -3240,6 +3246,7 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam, int modifiers)
void Unpause() void Unpause()
{ {
lastPauseFromLostFocus = FALSE; lastPauseFromLostFocus = FALSE;
if (!execute && !emu_paused) NDS_Pause(false), emu_paused=true;
if (emu_paused) NDS_UnPause(); if (emu_paused) NDS_UnPause();
emu_paused = 0; emu_paused = 0;
} }
@ -3247,6 +3254,7 @@ void Unpause()
void Pause() void Pause()
{ {
lastPauseFromLostFocus = FALSE; lastPauseFromLostFocus = FALSE;
if (execute && emu_paused) NDS_UnPause(false), emu_paused=false;
if (!emu_paused) NDS_Pause(); if (!emu_paused) NDS_Pause();
emu_paused = 1; emu_paused = 1;
} }

View File

@ -16,7 +16,7 @@ static u64 desiredFpsScalers [] = {
1024, 1024,
512, 512,
256, // 100% 256, // 100%
224, //224,
192, 192,
128, // 50% 128, // 50%
96, 96,