mirror of
https://github.com/dborth/vbagx.git
synced 2024-12-28 11:41: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)
|
if(!written)
|
||||||
{
|
{
|
||||||
unmountRequired[device] = true;
|
unmountRequired[device] = true;
|
||||||
|
if(silent) break;
|
||||||
retry = ErrorPromptRetry("Error saving file!");
|
retry = ErrorPromptRetry("Error saving file!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1291,7 +1291,12 @@ static int MenuGame()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
w.SetEffect(EFFECT_FADE, 15);
|
w.SetEffect(EFFECT_FADE, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
ResumeGui();
|
||||||
|
|
||||||
|
if(lastMenu == MENU_NONE)
|
||||||
|
{
|
||||||
if (GCSettings.AutoSave == 1)
|
if (GCSettings.AutoSave == 1)
|
||||||
{
|
{
|
||||||
SaveBatteryOrStateAuto(FILE_SRAM, SILENT); // save battery
|
SaveBatteryOrStateAuto(FILE_SRAM, SILENT); // save battery
|
||||||
@ -1311,8 +1316,6 @@ static int MenuGame()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ResumeGui();
|
|
||||||
|
|
||||||
while(menu == MENU_NONE)
|
while(menu == MENU_NONE)
|
||||||
{
|
{
|
||||||
usleep(THREAD_SLEEP);
|
usleep(THREAD_SLEEP);
|
||||||
@ -4365,10 +4368,6 @@ MainMenu (int menu)
|
|||||||
ShutoffRumble();
|
ShutoffRumble();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wait for keys to be depressed
|
|
||||||
while(MenuRequested())
|
|
||||||
usleep(THREAD_SLEEP);
|
|
||||||
|
|
||||||
CancelAction();
|
CancelAction();
|
||||||
HaltGui();
|
HaltGui();
|
||||||
|
|
||||||
@ -4406,4 +4405,11 @@ MainMenu (int menu)
|
|||||||
free(gameScreenTex2);
|
free(gameScreenTex2);
|
||||||
gameScreenTex2 = NULL;
|
gameScreenTex2 = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// wait for keys to be depressed
|
||||||
|
while(MenuRequested())
|
||||||
|
{
|
||||||
|
UpdatePads();
|
||||||
|
usleep(THREAD_SLEEP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user