Fix crash on quit / pause not working.

This commit is contained in:
Unknown W. Brackets 2013-02-21 01:05:37 -08:00
parent 2dda6874bd
commit e085c3ee76
3 changed files with 7 additions and 4 deletions

View file

@ -72,8 +72,8 @@ void Core_RunLoop()
if (coreState == CORE_NEXTFRAME)
{
#ifdef _WIN32
GL_SwapBuffers();
coreState = CORE_RUNNING;
GL_SwapBuffers();
#endif
}
}

View file

@ -408,7 +408,10 @@ void hleEnterVblank(u64 userdata, int cyclesLate) {
}
if (!skipFlip) {
// Might've just quit / been paused.
if (coreState == CORE_RUNNING) {
coreState = CORE_NEXTFRAME;
}
CoreTiming::ScheduleEvent(0 - cyclesLate, afterFlipEvent, 0);
gpu->CopyDisplayToOutput();

View file

@ -197,8 +197,8 @@ int main(int argc, const char* argv[])
// If we were rendering, this might be a nice time to do something about it.
if (coreState == CORE_NEXTFRAME) {
headlessHost->SwapBuffers();
coreState = CORE_RUNNING;
headlessHost->SwapBuffers();
}
}