*Added SD-Check before saving any settings or starting download.

This commit is contained in:
dimok321 2009-05-08 17:06:39 +00:00
parent 87b303a2fa
commit e7cb9981e3

View File

@ -2739,6 +2739,7 @@ static int MenuDiscList()
else if(DownloadBtn.GetState() == STATE_CLICKED) else if(DownloadBtn.GetState() == STATE_CLICKED)
{ {
if(isSdInserted() == 1) {
choice = DownloadWindowPrompt(); // ask for download choice choice = DownloadWindowPrompt(); // ask for download choice
if (choice != 0) if (choice != 0)
@ -2787,6 +2788,9 @@ static int MenuDiscList()
} }
} }
} }
} else {
WindowPrompt("No SD-Card inserted!", "Insert a SD-Card to download images.", "OK", 0);
}
DownloadBtn.ResetState(); DownloadBtn.ResetState();
gameBrowser.SetFocus(1); gameBrowser.SetFocus(1);
}//end download }//end download
@ -3789,7 +3793,9 @@ static int MenuSettings()
if(backBtn.GetState() == STATE_CLICKED) if(backBtn.GetState() == STATE_CLICKED)
{ {
//Add the procedure call to save the global configuration //Add the procedure call to save the global configuration
if(isSdInserted() == 1) {
cfg_save_global(); cfg_save_global();
}
menu = MENU_DISCLIST; menu = MENU_DISCLIST;
pageToDisplay = 0; pageToDisplay = 0;
break; break;
@ -4072,6 +4078,7 @@ int GameSettings(struct discHdr * header)
if(saveBtn.GetState() == STATE_CLICKED) if(saveBtn.GetState() == STATE_CLICKED)
{ {
if(isSdInserted() == 1) {
if (CFG_save_game_opt(header->id)) if (CFG_save_game_opt(header->id))
{ {
WindowPrompt("Successfully Saved", 0, "OK", 0); WindowPrompt("Successfully Saved", 0, "OK", 0);
@ -4080,6 +4087,9 @@ int GameSettings(struct discHdr * header)
{ {
WindowPrompt("Save Failed", 0, "OK", 0); WindowPrompt("Save Failed", 0, "OK", 0);
} }
} else {
WindowPrompt("No SD-Card inserted!", "Insert a SD-Card to save.", "OK", 0);
}
saveBtn.ResetState(); saveBtn.ResetState();
optionBrowser3.SetFocus(1); optionBrowser3.SetFocus(1);