add more pref file search locations

This commit is contained in:
dborth 2009-12-23 07:22:19 +00:00
parent 707599e09d
commit b68c750b8e
2 changed files with 17 additions and 21 deletions

View File

@ -640,7 +640,12 @@ LoadPrefsFromMethod (char * path)
FreeSaveBuffer (); FreeSaveBuffer ();
if(retval) if(retval)
strcpy(prefpath, filepath); {
strcpy(prefpath, path);
if(appPath[0] == 0)
strcpy(appPath, prefpath);
}
return retval; return retval;
} }
@ -661,10 +666,12 @@ bool LoadPrefs()
int numDevices; int numDevices;
#ifdef HW_RVL #ifdef HW_RVL
numDevices = 3; numDevices = 5;
sprintf(filepath[0], "%s", appPath); sprintf(filepath[0], "%s", appPath);
sprintf(filepath[1], "sd:/%s", APPFOLDER); sprintf(filepath[1], "sd:/apps/%s", APPFOLDER);
sprintf(filepath[2], "usb:/%s", APPFOLDER); sprintf(filepath[2], "usb:/apps/%s", APPFOLDER);
sprintf(filepath[3], "sd:/%s", APPFOLDER);
sprintf(filepath[4], "usb:/%s", APPFOLDER);
#else #else
numDevices = 2; numDevices = 2;
sprintf(filepath[0], "carda:/%s", APPFOLDER); sprintf(filepath[0], "carda:/%s", APPFOLDER);

View File

@ -58,28 +58,17 @@ void FixInvalidSettings()
void void
DefaultSettings () DefaultSettings ()
{ {
/************** GameCube/Wii Settings *********************/ memset (&GCSettings, 0, sizeof (GCSettings));
ResetControls(); // controller button mappings ResetControls(); // controller button mappings
GCSettings.LoadMethod = DEVICE_AUTO; // Auto, SD, DVD, USB, Network (SMB) GCSettings.LoadMethod = DEVICE_AUTO; // Auto, SD, DVD, USB, Network (SMB)
GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, Memory Card Slot A, Memory Card Slot B, USB, Network (SMB) GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, USB, Network (SMB)
sprintf (GCSettings.LoadFolder,"vbagx/roms"); // Path to game files sprintf (GCSettings.LoadFolder, "%s/roms", APPFOLDER); // Path to game files
sprintf (GCSettings.SaveFolder,"vbagx/saves"); // Path to save files sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files
sprintf (GCSettings.CheatFolder,"vbagx/cheats"); // Path to cheat files sprintf (GCSettings.CheatFolder, "%s/cheats", APPFOLDER); // Path to cheat files
GCSettings.AutoLoad = 1; GCSettings.AutoLoad = 1;
GCSettings.AutoSave = 1; GCSettings.AutoSave = 1;
// custom SMB settings
strncpy (GCSettings.smbip, "", 15); // IP Address of share server
strncpy (GCSettings.smbuser, "", 19); // Your share user
strncpy (GCSettings.smbpwd, "", 19); // Your share user password
strncpy (GCSettings.smbshare, "", 19); // Share name on server
GCSettings.smbip[15] = 0;
GCSettings.smbuser[19] = 0;
GCSettings.smbpwd[19] = 0;
GCSettings.smbshare[19] = 0;
GCSettings.WiimoteOrientation = 0; GCSettings.WiimoteOrientation = 0;
GCSettings.gbaZoomHor = 1.0; // GBA horizontal zoom level GCSettings.gbaZoomHor = 1.0; // GBA horizontal zoom level