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) if(!written)
{ {
unmountRequired[device] = true; unmountRequired[device] = true;
if(silent) break;
retry = ErrorPromptRetry("Error saving file!"); retry = ErrorPromptRetry("Error saving file!");
} }
} }

View File

@ -1384,10 +1384,12 @@ 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)
{ {
@ -3982,10 +3984,6 @@ MainMenu (int menu)
ShutoffRumble(); ShutoffRumble();
#endif #endif
// wait for keys to be depressed
while(MenuRequested())
usleep(100);
CancelAction(); CancelAction();
HaltGui(); HaltGui();
@ -4030,4 +4028,11 @@ MainMenu (int menu)
free(gameScreenTex2); free(gameScreenTex2);
gameScreenTex2 = NULL; gameScreenTex2 = NULL;
} }
// wait for keys to be depressed
while(MenuRequested())
{
UpdatePads();
usleep(THREAD_SLEEP);
}
} }