bool LoadPrefs() { if (prefLoaded) // already attempted loading return true; bool prefFound = false; prefFound = LoadPrefsFromMethod(MPLAYER_DATADIR); prefLoaded = true; // attempted to load preferences if (prefFound) FixInvalidSettings(); return prefFound; }
bool LoadPrefs() { if(prefLoaded) // already attempted loading return true; bool prefFound = false; char filepath[4][MAXPATHLEN]; int numDevices; #ifdef HW_RVL numDevices = 5; sprintf(filepath[0], "%s", appPath); sprintf(filepath[1], "sd:/apps/%s", APPFOLDER); sprintf(filepath[2], "usb:/apps/%s", APPFOLDER); sprintf(filepath[3], "sd:/%s", APPFOLDER); sprintf(filepath[4], "usb:/%s", APPFOLDER); #else numDevices = 2; sprintf(filepath[0], "carda:/%s", APPFOLDER); sprintf(filepath[1], "cardb:/%s", APPFOLDER); #endif for(int i=0; i<numDevices; i++) { prefFound = LoadPrefsFromMethod(filepath[i]); if(prefFound) break; } prefLoaded = true; // attempted to load preferences if(prefFound) FixInvalidSettings(); ResetText(); return prefFound; }
bool LoadPrefs() { if(prefLoaded) // already attempted loading return true; bool prefFound = false; char filepath[5][MAXPATHLEN]; int numDevices; #ifdef HW_RVL numDevices = 5; sprintf(filepath[0], "%s", appPath); sprintf(filepath[1], "sd:/apps/%s", APPFOLDER); sprintf(filepath[2], "usb:/apps/%s", APPFOLDER); sprintf(filepath[3], "sd:/%s", APPFOLDER); sprintf(filepath[4], "usb:/%s", APPFOLDER); #else numDevices = 2; sprintf(filepath[0], "carda:/%s", APPFOLDER); sprintf(filepath[1], "cardb:/%s", APPFOLDER); #endif for(int i=0; i<numDevices; i++) { prefFound = LoadPrefsFromMethod(filepath[i]); if(prefFound) break; } prefLoaded = true; // attempted to load preferences if(prefFound) FixInvalidSettings(); // rename snes9x to snes9xgx if(GCSettings.LoadMethod == DEVICE_SD) { if(ChangeInterface(DEVICE_SD, NOTSILENT) && opendir("sd:/snes9x")) rename("sd:/snes9x", "sd:/snes9xgx"); } else if(GCSettings.LoadMethod == DEVICE_USB) { if(ChangeInterface(DEVICE_USB, NOTSILENT) && opendir("usb:/snes9x")) rename("usb:/snes9x", "usb:/snes9xgx"); } else if(GCSettings.LoadMethod == DEVICE_SMB) { if(ChangeInterface(DEVICE_SMB, NOTSILENT) && opendir("smb:/snes9x")) rename("smb:/snes9x", "smb:/snes9xgx"); } // update folder locations if(strcmp(GCSettings.LoadFolder, "snes9x/roms") == 0) sprintf(GCSettings.LoadFolder, "snes9xgx/roms"); if(strcmp(GCSettings.SaveFolder, "snes9x/saves") == 0) sprintf(GCSettings.SaveFolder, "snes9xgx/saves"); if(strcmp(GCSettings.CheatFolder, "snes9x/cheats") == 0) sprintf(GCSettings.CheatFolder, "snes9xgx/cheats"); if(strcmp(GCSettings.ScreenshotsFolder, "snes9x/screenshots") == 0) sprintf(GCSettings.ScreenshotsFolder, "snes9xgx/screenshots"); ResetText(); return prefFound; }