fix some possible hangs

This commit is contained in:
dborth 2010-04-13 05:18:24 +00:00
parent 2421a712dc
commit 0a8cd661bb
2 changed files with 11 additions and 5 deletions

View File

@ -866,6 +866,7 @@ SaveFile (char * buffer, char *filepath, size_t datasize, bool silent)
if(!written)
{
unmountRequired[device] = true;
if(silent) break;
retry = ErrorPromptRetry("Error saving file!");
}
}

View File

@ -1384,10 +1384,12 @@ static int MenuGame()
#endif
w.SetEffect(EFFECT_FADE, 15);
AutoSave();
}
ResumeGui();
if(lastMenu == MENU_NONE)
AutoSave();
while(menu == MENU_NONE)
{
@ -3982,10 +3984,6 @@ MainMenu (int menu)
ShutoffRumble();
#endif
// wait for keys to be depressed
while(MenuRequested())
usleep(100);
CancelAction();
HaltGui();
@ -4030,4 +4028,11 @@ MainMenu (int menu)
free(gameScreenTex2);
gameScreenTex2 = NULL;
}
// wait for keys to be depressed
while(MenuRequested())
{
UpdatePads();
usleep(THREAD_SLEEP);
}
}