mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-24 03:29:22 +01:00
fix some hangs
This commit is contained in:
parent
f8823d6215
commit
f2286d213b
@ -869,6 +869,7 @@ SaveFile (char * buffer, char *filepath, size_t datasize, bool silent)
|
|||||||
if(!written)
|
if(!written)
|
||||||
{
|
{
|
||||||
unmountRequired[device] = true;
|
unmountRequired[device] = true;
|
||||||
|
if(silent) break;
|
||||||
retry = ErrorPromptRetry("Error saving file!");
|
retry = ErrorPromptRetry("Error saving file!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1377,11 +1377,13 @@ static int MenuGame()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
w.SetEffect(EFFECT_FADE, 15);
|
w.SetEffect(EFFECT_FADE, 15);
|
||||||
AutoSave();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
|
|
||||||
|
if(lastMenu == MENU_NONE)
|
||||||
|
AutoSave();
|
||||||
|
|
||||||
while(menu == MENU_NONE)
|
while(menu == MENU_NONE)
|
||||||
{
|
{
|
||||||
usleep(THREAD_SLEEP);
|
usleep(THREAD_SLEEP);
|
||||||
@ -3937,10 +3939,6 @@ MainMenu (int menu)
|
|||||||
ShutoffRumble();
|
ShutoffRumble();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wait for keys to be depressed
|
|
||||||
while(MenuRequested())
|
|
||||||
usleep(THREAD_SLEEP);
|
|
||||||
|
|
||||||
CancelAction();
|
CancelAction();
|
||||||
HaltGui();
|
HaltGui();
|
||||||
|
|
||||||
@ -3985,4 +3983,11 @@ MainMenu (int menu)
|
|||||||
free(gameScreenTex2);
|
free(gameScreenTex2);
|
||||||
gameScreenTex2 = NULL;
|
gameScreenTex2 = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// wait for keys to be depressed
|
||||||
|
while(MenuRequested())
|
||||||
|
{
|
||||||
|
UpdatePads();
|
||||||
|
usleep(THREAD_SLEEP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -691,6 +691,9 @@ update_video (int width, int height)
|
|||||||
vwidth = width;
|
vwidth = width;
|
||||||
vheight = height;
|
vheight = height;
|
||||||
|
|
||||||
|
if(IPPU.RenderedFramesCount == prevRenderedFrameCount)
|
||||||
|
return; // we haven't rendered any frames yet, so we can't draw anything!
|
||||||
|
|
||||||
// Ensure previous vb has complete
|
// Ensure previous vb has complete
|
||||||
while ((LWP_ThreadIsSuspended (vbthread) == 0) || (copynow == GX_TRUE))
|
while ((LWP_ThreadIsSuspended (vbthread) == 0) || (copynow == GX_TRUE))
|
||||||
usleep (50);
|
usleep (50);
|
||||||
@ -700,7 +703,7 @@ update_video (int width, int height)
|
|||||||
if (oldvheight != vheight || oldvwidth != vwidth) // if rendered width/height changes, update scaling
|
if (oldvheight != vheight || oldvwidth != vwidth) // if rendered width/height changes, update scaling
|
||||||
CheckVideo = 1;
|
CheckVideo = 1;
|
||||||
|
|
||||||
if ( CheckVideo && (IPPU.RenderedFramesCount != prevRenderedFrameCount) ) // if we get back from the menu, and have rendered at least 1 frame
|
if (CheckVideo) // if we get back from the menu, and have rendered at least 1 frame
|
||||||
{
|
{
|
||||||
int xscale, yscale;
|
int xscale, yscale;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user