Added a macron in case any particular title happens to require it. The network init prompt won't show up at all when network has already been initialized. Ocarina should work for people that still had the problem with recent revisions (it fixed it for me, but only when using SD, not SDHC).

This commit is contained in:
lustar.mii 2009-10-18 21:23:54 +00:00
parent 06e5f81c3a
commit 08ce514727
10 changed files with 42 additions and 90 deletions

File diff suppressed because one or more lines are too long

View File

@ -34,10 +34,6 @@ void USBDevice_deInit() {
fatUnmount("USB:/"); fatUnmount("USB:/");
} }
int isSdInserted() {
return __io_sdhc.isInserted() || __io_wiisd.isInserted();
}
int isInserted(const char *path) { int isInserted(const char *path) {
if (!strncmp(path, "USB:", 4)) if (!strncmp(path, "USB:", 4))
return 1; return 1;
@ -48,10 +44,10 @@ int SDCard_Init() {
//closing all open Files write back the cache and then shutdown em! //closing all open Files write back the cache and then shutdown em!
fatUnmount("SD:/"); fatUnmount("SD:/");
//right now mounts first FAT-partition //right now mounts first FAT-partition
if (fatMount("SD", &__io_sdhc, 0, CACHE, SDHC_SECTOR_SIZE)) if (fatMount("SD", &__io_wiisd, 0, CACHE, SECTORS))
return 1;
else if (fatMount("SD", &__io_sdhc, 0, CACHE, SDHC_SECTOR_SIZE))
return 1; return 1;
else if (fatMount("SD", &__io_wiisd, 0, CACHE, SECTORS))
return 1;
return -1; return -1;
} }

View File

@ -7,7 +7,6 @@ extern "C" {
int USBDevice_Init(); int USBDevice_Init();
void USBDevice_deInit(); void USBDevice_deInit();
int isSdInserted();
int isInserted(const char *path); int isInserted(const char *path);
int SDCard_Init(); int SDCard_Init();
void SDCard_deInit(); void SDCard_deInit();

Binary file not shown.

View File

@ -1062,7 +1062,6 @@ int MenuDiscList() {
startat = gameCarousel->GetSelectedOption(); startat = gameCarousel->GetSelectedOption();
offset = gameCarousel->GetOffset(); offset = gameCarousel->GetOffset();
} }
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
HaltGui(); // to fix endless rumble when clicking on the SD icon when rumble is disabled because rumble is set to on in Global_Default() HaltGui(); // to fix endless rumble when clicking on the SD icon when rumble is disabled because rumble is set to on in Global_Default()
CFG_Load(); CFG_Load();
@ -1074,7 +1073,6 @@ int MenuDiscList() {
} }
else if (DownloadBtn.GetState() == STATE_CLICKED) { else if (DownloadBtn.GetState() == STATE_CLICKED) {
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
choice = WindowPrompt(tr("Cover Download"), 0, tr("Normal Covers"), tr("3D Covers"), tr("Disc Images"), tr("Back")); // ask for download choice choice = WindowPrompt(tr("Cover Download"), 0, tr("Normal Covers"), tr("3D Covers"), tr("Disc Images"), tr("Back")); // ask for download choice
if (choice != 0) { if (choice != 0) {
@ -1133,7 +1131,6 @@ int MenuDiscList() {
else if (favoriteBtn.GetState() == STATE_CLICKED) { else if (favoriteBtn.GetState() == STATE_CLICKED) {
Settings.fave=!Settings.fave; Settings.fave=!Settings.fave;
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
cfg_save_global(); cfg_save_global();
} }
@ -1228,7 +1225,6 @@ int MenuDiscList() {
else if (abcBtn.GetState() == STATE_CLICKED) { else if (abcBtn.GetState() == STATE_CLICKED) {
if (Settings.sort != all) { if (Settings.sort != all) {
Settings.sort=all; Settings.sort=all;
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
cfg_save_global(); cfg_save_global();
} }
@ -1243,7 +1239,6 @@ int MenuDiscList() {
else if (countBtn.GetState() == STATE_CLICKED) { else if (countBtn.GetState() == STATE_CLICKED) {
if (Settings.sort != pcount) { if (Settings.sort != pcount) {
Settings.sort=pcount; Settings.sort=pcount;
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
cfg_save_global(); cfg_save_global();
} }

View File

@ -18,6 +18,7 @@
#include "network/networkops.h" #include "network/networkops.h"
#include "network/http.h" #include "network/http.h"
#include "prompts/PromptWindows.h" #include "prompts/PromptWindows.h"
#include "prompts/gameinfo.h"
#include "mload/mload.h" #include "mload/mload.h"
#include "fatmounter.h" #include "fatmounter.h"
#include "listfiles.h" #include "listfiles.h"
@ -1380,7 +1381,6 @@ int GameWindowPrompt() {
promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50);
} }
else if (btnFavorite1.GetState() == STATE_CLICKED) {//switch favorite else if (btnFavorite1.GetState() == STATE_CLICKED) {//switch favorite
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 1); SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 1);
SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite); SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite);
@ -1388,7 +1388,6 @@ int GameWindowPrompt() {
btnFavorite1.ResetState(); btnFavorite1.ResetState();
} }
else if (btnFavorite2.GetState() == STATE_CLICKED) {//switch favorite else if (btnFavorite2.GetState() == STATE_CLICKED) {//switch favorite
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 2); SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 2);
SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite); SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite);
@ -1396,7 +1395,6 @@ int GameWindowPrompt() {
btnFavorite2.ResetState(); btnFavorite2.ResetState();
} }
else if (btnFavorite3.GetState() == STATE_CLICKED) {//switch favorite else if (btnFavorite3.GetState() == STATE_CLICKED) {//switch favorite
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 3); SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 3);
SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite); SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite);
@ -1404,7 +1402,6 @@ int GameWindowPrompt() {
btnFavorite3.ResetState(); btnFavorite3.ResetState();
} }
else if (btnFavorite4.GetState() == STATE_CLICKED) {//switch favorite else if (btnFavorite4.GetState() == STATE_CLICKED) {//switch favorite
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 4); SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 4);
SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite); SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite);
@ -1412,7 +1409,6 @@ int GameWindowPrompt() {
btnFavorite4.ResetState(); btnFavorite4.ResetState();
} }
else if (btnFavorite5.GetState() == STATE_CLICKED) {//switch favorite else if (btnFavorite5.GetState() == STATE_CLICKED) {//switch favorite
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 5); SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 5);
SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite); SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite);
@ -1823,7 +1819,7 @@ bool SearchMissingImages(int choice2) {
__Menu_GetEntries(); __Menu_GetEntries();
ResumeGui(); ResumeGui();
if (cntMissFiles > 0) { //&& !IsNetworkInit()) { if (cntMissFiles > 0) {
NetworkInitPrompt(); NetworkInitPrompt();
} }
@ -1837,6 +1833,10 @@ bool SearchMissingImages(int choice2) {
* NetworkInitPrompt * NetworkInitPrompt
***************************************************************************/ ***************************************************************************/
bool NetworkInitPrompt() { bool NetworkInitPrompt() {
if (IsNetworkInit())
return true;
bool success = true; bool success = true;
GuiWindow promptWindow(472,320); GuiWindow promptWindow(472,320);
@ -2548,23 +2548,9 @@ int ProgressUpdateWindow() {
} }
//make the URL to get XML based on our games //make the URL to get XML based on our games
char XMLurl[3540]; // NET_BUFFER_SIZE in http.c needs to be set to size of XMLurl + 40 char XMLurl[3540];
char filename[10]; build_XML_URL(XMLurl,sizeof(XMLurl));
__Menu_GetEntries(1);
snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s&ID=",Settings.db_language);
unsigned int i;
for (i = 0; i < gameCnt ; i++) {
struct discHdr* header = &gameList[i];
if (i<500) {
//snprintf(filename,sizeof(filename),"%c%c%c", header->id[1], header->id[2], header->id[3]);
//strncat(XMLurl,filename,3);
snprintf(filename,sizeof(filename),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
strncat(XMLurl,filename,6);
if ((i!=gameCnt-1)&&(i<500))
strncat(XMLurl, ",",1);
}
}
__Menu_GetEntries();
if (IsNetworkInit() && ret >= 0) { if (IsNetworkInit() && ret >= 0) {
updatemode = WindowPrompt(tr("What do you want to update?"), 0, "USBLoader GX", tr("WiiTDB Files"), tr("Languagefile"), tr("Cancel")); updatemode = WindowPrompt(tr("What do you want to update?"), 0, "USBLoader GX", tr("WiiTDB Files"), tr("Languagefile"), tr("Cancel"));
@ -2868,23 +2854,9 @@ int ProgressUpdateWindow() {
} }
//make the URL to get XML based on our games //make the URL to get XML based on our games
char XMLurl[3540]; char XMLurl[3540];
char filename[10]; build_XML_URL(XMLurl,sizeof(XMLurl));
__Menu_GetEntries(1);
snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s&ID=",Settings.db_language);
unsigned int i;
for (i = 0; i < gameCnt ; i++) {
struct discHdr* header = &gameList[i];
if (i<500) {
//snprintf(filename,sizeof(filename),"%c%c%c", header->id[1], header->id[2], header->id[3]);
//strncat(XMLurl, filename,3 );
snprintf(filename,sizeof(filename),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
strncat(XMLurl,filename,6);
if ((i!=gameCnt-1)&&(i<500))
strncat(XMLurl, ",",1);
}
}
__Menu_GetEntries();
char dolpath[150]; char dolpath[150];
// char dolpathsuccess[150];//use coverspath as a folder for the update wad so we dont make a new folder and have to delete it // char dolpathsuccess[150];//use coverspath as a folder for the update wad so we dont make a new folder and have to delete it
snprintf(dolpath, sizeof(dolpath), "%sULNR.wad", Settings.covers_path); snprintf(dolpath, sizeof(dolpath), "%sULNR.wad", Settings.covers_path);

View File

@ -1086,26 +1086,10 @@ bool save_XML_URL() { // save xml url as as txt file for people without wifi
sleep(1); sleep(1);
return false; return false;
} }
//make sure that all games are added to the gamelist
__Menu_GetEntries(1); char XMLurl[3540];
build_XML_URL(XMLurl,sizeof(XMLurl));
char XMLurl[3540];
char filename[10];
snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s&ID=", Settings.db_language);
unsigned int i;
for (i = 0; i < gameCnt ; i++) {
struct discHdr* header = &gameList[i];
if (i<500) {
//snprintf(filename,sizeof(filename),"%c%c%c", header->id[1], header->id[2], header->id[3]);
//strncat(XMLurl, filename,3 );
snprintf(filename,sizeof(filename),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
strncat(XMLurl,filename,6);
if ((i!=gameCnt-1)&&(i<500))
strncat(XMLurl, ",",1);
}
}
fprintf(f, "# USB Loader Has Saved this file\n"); fprintf(f, "# USB Loader Has Saved this file\n");
fprintf(f, "# This URL was created based on your list of games and language settings.\n"); fprintf(f, "# This URL was created based on your list of games and language settings.\n");
fclose(f); fclose(f);
@ -1118,7 +1102,6 @@ bool save_XML_URL() { // save xml url as as txt file for people without wifi
fclose(f); fclose(f);
__Menu_GetEntries();
return true; return true;
} }
@ -1129,3 +1112,24 @@ void MemInfoPrompt()
strlcpy(meminfotxt,MemInfo(),sizeof(meminfotxt)); strlcpy(meminfotxt,MemInfo(),sizeof(meminfotxt));
WindowPrompt(0,meminfotxt, tr("OK")); WindowPrompt(0,meminfotxt, tr("OK"));
} }
void build_XML_URL(char *XMLurl, int XMLurlsize) {
__Menu_GetEntries(1);
// NET_BUFFER_SIZE in http.c needs to be set to size of XMLurl + 40
char url[3540];
char filename[10];
snprintf(url,sizeof(url),"http://wiitdb.com/wiitdb.zip?LANG=%s&ID=", Settings.db_language);
unsigned int i;
for (i = 0; i < gameCnt ; i++) {
struct discHdr* header = &gameList[i];
if (i<500) {
snprintf(filename,sizeof(filename),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
strncat(url,filename,6);
if ((i!=gameCnt-1)&&(i<500))
strncat(url, ",",1);
}
}
strlcpy(XMLurl,url,XMLurlsize);
__Menu_GetEntries();
}

View File

@ -9,6 +9,7 @@
#define _GAMEINFO_H_ #define _GAMEINFO_H_
int showGameInfo(char *ID); int showGameInfo(char *ID);
void build_XML_URL(char *XMLurl, int XMLurlsize);
bool save_XML_URL(); bool save_XML_URL();
bool save_gamelist(int txt); bool save_gamelist(int txt);
void MemInfoPrompt(); void MemInfoPrompt();

View File

@ -551,7 +551,6 @@ int MenuSettings() {
switch (ret) switch (ret)
{ {
case 0: case 0:
//if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
if ( Settings.godmode == 1) { if ( Settings.godmode == 1) {
w.SetEffect(EFFECT_FADE, -20); w.SetEffect(EFFECT_FADE, -20);
@ -1130,7 +1129,6 @@ int MenuSettings() {
switch (ret) switch (ret)
{ {
case 0: case 0:
//if(isSdInserted())
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
w.SetEffect(EFFECT_FADE, -20); w.SetEffect(EFFECT_FADE, -20);
while (w.GetEffect()>0) usleep(50); while (w.GetEffect()>0) usleep(50);
@ -1293,7 +1291,6 @@ int MenuSettings() {
strncat (entered, "/", 1); strncat (entered, "/", 1);
strlcpy(Settings.covers_path, entered, sizeof(Settings.covers_path)); strlcpy(Settings.covers_path, entered, sizeof(Settings.covers_path));
WindowPrompt(tr("Cover Path Changed"),0,tr("OK")); WindowPrompt(tr("Cover Path Changed"),0,tr("OK"));
// if(!isSdInserted()) {
if (!isInserted(bootDevice)) { if (!isInserted(bootDevice)) {
WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"));
} }
@ -1319,7 +1316,6 @@ int MenuSettings() {
strncat (entered, "/", 1); strncat (entered, "/", 1);
strlcpy(Settings.covers2d_path, entered, sizeof(Settings.covers2d_path)); strlcpy(Settings.covers2d_path, entered, sizeof(Settings.covers2d_path));
WindowPrompt(tr("Cover Path Changed"),0,tr("OK")); WindowPrompt(tr("Cover Path Changed"),0,tr("OK"));
// if(!isSdInserted()) {
if (!isInserted(bootDevice)) { if (!isInserted(bootDevice)) {
WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"));
} }
@ -1345,7 +1341,6 @@ int MenuSettings() {
strncat (entered, "/", 1); strncat (entered, "/", 1);
strlcpy(Settings.disc_path, entered, sizeof(Settings.disc_path)); strlcpy(Settings.disc_path, entered, sizeof(Settings.disc_path));
WindowPrompt(tr("Disc Path Changed"),0,tr("OK")); WindowPrompt(tr("Disc Path Changed"),0,tr("OK"));
// if(!isSdInserted()) {
if (!isInserted(bootDevice)) { if (!isInserted(bootDevice)) {
WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"));
} }
@ -1370,7 +1365,6 @@ int MenuSettings() {
strncat (entered, "/", 1); strncat (entered, "/", 1);
strlcpy(CFG.theme_path, entered, sizeof(CFG.theme_path)); strlcpy(CFG.theme_path, entered, sizeof(CFG.theme_path));
WindowPrompt(tr("Theme Path Changed"),0,tr("OK")); WindowPrompt(tr("Theme Path Changed"),0,tr("OK"));
// if(!isSdInserted()) {
if (!isInserted(bootDevice)) { if (!isInserted(bootDevice)) {
WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"));
} else { } else {
@ -1430,7 +1424,6 @@ int MenuSettings() {
strncat (entered, "/", 1); strncat (entered, "/", 1);
strlcpy(Settings.titlestxt_path, entered, sizeof(Settings.titlestxt_path)); strlcpy(Settings.titlestxt_path, entered, sizeof(Settings.titlestxt_path));
WindowPrompt(tr("WiiTDB Path changed."),0,tr("OK")); WindowPrompt(tr("WiiTDB Path changed."),0,tr("OK"));
// if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
cfg_save_global(); cfg_save_global();
HaltGui(); HaltGui();
@ -1524,7 +1517,6 @@ int MenuSettings() {
strncat (entered, "/", 1); strncat (entered, "/", 1);
strlcpy(Settings.dolpath, entered, sizeof(Settings.dolpath)); strlcpy(Settings.dolpath, entered, sizeof(Settings.dolpath));
WindowPrompt(tr("DOL path changed"),0,tr("OK")); WindowPrompt(tr("DOL path changed"),0,tr("OK"));
// if(!isSdInserted()) {
if (!isInserted(bootDevice)) { if (!isInserted(bootDevice)) {
WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"));
} }
@ -1550,7 +1542,6 @@ int MenuSettings() {
strncat (entered, "/", 1); strncat (entered, "/", 1);
strlcpy(Settings.homebrewapps_path, entered, sizeof(Settings.homebrewapps_path)); strlcpy(Settings.homebrewapps_path, entered, sizeof(Settings.homebrewapps_path));
WindowPrompt(tr("Homebrew Appspath changed"),0,tr("OK")); WindowPrompt(tr("Homebrew Appspath changed"),0,tr("OK"));
// if(!isSdInserted()) {
if (!isInserted(bootDevice)) { if (!isInserted(bootDevice)) {
WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK"));
} }
@ -1601,7 +1592,6 @@ int MenuSettings() {
w.Remove(&MainButton2); w.Remove(&MainButton2);
w.Remove(&MainButton3); w.Remove(&MainButton3);
w.Remove(&MainButton4); w.Remove(&MainButton4);
// if(isSdInserted() && Settings.godmode) {
if (isInserted(bootDevice) && Settings.godmode) { if (isInserted(bootDevice) && Settings.godmode) {
w.Remove(&optionBrowser2); w.Remove(&optionBrowser2);
w.Remove(&backBtn); w.Remove(&backBtn);
@ -1639,7 +1629,6 @@ int MenuSettings() {
if (Settings.godmode) { if (Settings.godmode) {
int choice = WindowPrompt(tr("Are you sure?"), 0, tr("Yes"), tr("Cancel")); int choice = WindowPrompt(tr("Are you sure?"), 0, tr("Yes"), tr("Cancel"));
if (choice == 1) { if (choice == 1) {
// if(isSdInserted())
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
char GXGlobal_cfg[26]; char GXGlobal_cfg[26];
sprintf(GXGlobal_cfg, "%s/config/GXGlobal.cfg", bootDevice); sprintf(GXGlobal_cfg, "%s/config/GXGlobal.cfg", bootDevice);
@ -1692,7 +1681,6 @@ int MenuSettings() {
else if (backBtn.GetState() == STATE_CLICKED) { else 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()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
cfg_save_global(); cfg_save_global();
} }

View File

@ -232,7 +232,6 @@ bool MenuOGG() {
strncat (entered, "/", 1); strncat (entered, "/", 1);
strlcpy(Settings.oggload_path, entered, sizeof(Settings.oggload_path)); strlcpy(Settings.oggload_path, entered, sizeof(Settings.oggload_path));
WindowPrompt(tr("Backgroundmusic Path changed."),0,tr("OK")); WindowPrompt(tr("Backgroundmusic Path changed."),0,tr("OK"));
// if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
if (!strcmp("", Settings.oggload_path)) { if (!strcmp("", Settings.oggload_path)) {
sprintf(Settings.ogg_path, "notset"); sprintf(Settings.ogg_path, "notset");
@ -549,7 +548,6 @@ int MenuLanguageSelect() {
strncat (entered, "/", 1); strncat (entered, "/", 1);
strlcpy(Settings.languagefiles_path, entered, sizeof(Settings.languagefiles_path)); strlcpy(Settings.languagefiles_path, entered, sizeof(Settings.languagefiles_path));
WindowPrompt(tr("Languagepath changed."),0,tr("OK")); WindowPrompt(tr("Languagepath changed."),0,tr("OK"));
// if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
cfg_save_global(); cfg_save_global();
returnhere = 1; returnhere = 1;
@ -569,7 +567,6 @@ int MenuLanguageSelect() {
if (ret>=0) { if (ret>=0) {
choice = WindowPrompt(tr("Do you want to change language?"), 0, tr("Yes"), tr("Cancel")); choice = WindowPrompt(tr("Do you want to change language?"), 0, tr("Yes"), tr("Cancel"));
if (choice == 1) { if (choice == 1) {
// if(isSdInserted()) {
if (isInserted(bootDevice)) { if (isInserted(bootDevice)) {
snprintf(Settings.language_path, sizeof(Settings.language_path), "%s%s", Settings.languagefiles_path, GetFileName(ret)); snprintf(Settings.language_path, sizeof(Settings.language_path), "%s%s", Settings.languagefiles_path, GetFileName(ret));
cfg_save_global(); cfg_save_global();