mirror of
https://github.com/dborth/vbagx.git
synced 2024-12-27 03:01:50 +01:00
fix some possible hangs
This commit is contained in:
parent
f58a18857e
commit
ea2cc55103
@ -865,6 +865,7 @@ SaveFile (char * buffer, char *filepath, size_t datasize, bool silent)
|
||||
if(!written)
|
||||
{
|
||||
unmountRequired[device] = true;
|
||||
if(silent) break;
|
||||
retry = ErrorPromptRetry("Error saving file!");
|
||||
}
|
||||
}
|
||||
|
@ -1291,7 +1291,12 @@ static int MenuGame()
|
||||
#endif
|
||||
|
||||
w.SetEffect(EFFECT_FADE, 15);
|
||||
}
|
||||
|
||||
ResumeGui();
|
||||
|
||||
if(lastMenu == MENU_NONE)
|
||||
{
|
||||
if (GCSettings.AutoSave == 1)
|
||||
{
|
||||
SaveBatteryOrStateAuto(FILE_SRAM, SILENT); // save battery
|
||||
@ -1311,8 +1316,6 @@ static int MenuGame()
|
||||
}
|
||||
}
|
||||
|
||||
ResumeGui();
|
||||
|
||||
while(menu == MENU_NONE)
|
||||
{
|
||||
usleep(THREAD_SLEEP);
|
||||
@ -4365,10 +4368,6 @@ MainMenu (int menu)
|
||||
ShutoffRumble();
|
||||
#endif
|
||||
|
||||
// wait for keys to be depressed
|
||||
while(MenuRequested())
|
||||
usleep(THREAD_SLEEP);
|
||||
|
||||
CancelAction();
|
||||
HaltGui();
|
||||
|
||||
@ -4406,4 +4405,11 @@ MainMenu (int menu)
|
||||
free(gameScreenTex2);
|
||||
gameScreenTex2 = NULL;
|
||||
}
|
||||
|
||||
// wait for keys to be depressed
|
||||
while(MenuRequested())
|
||||
{
|
||||
UpdatePads();
|
||||
usleep(THREAD_SLEEP);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user