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

@ -638,9 +638,14 @@ LoadPrefsFromMethod (char * path)
retval = decodePrefsData ();
FreeSaveBuffer ();
if(retval)
strcpy(prefpath, filepath);
{
strcpy(prefpath, path);
if(appPath[0] == 0)
strcpy(appPath, prefpath);
}
return retval;
}
@ -661,10 +666,12 @@ bool LoadPrefs()
int numDevices;
#ifdef HW_RVL
numDevices = 3;
numDevices = 5;
sprintf(filepath[0], "%s", appPath);
sprintf(filepath[1], "sd:/%s", APPFOLDER);
sprintf(filepath[2], "usb:/%s", APPFOLDER);
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);

View File

@ -58,28 +58,17 @@ void FixInvalidSettings()
void
DefaultSettings ()
{
/************** GameCube/Wii Settings *********************/
memset (&GCSettings, 0, sizeof (GCSettings));
ResetControls(); // controller button mappings
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)
sprintf (GCSettings.LoadFolder,"vbagx/roms"); // Path to game files
sprintf (GCSettings.SaveFolder,"vbagx/saves"); // Path to save files
sprintf (GCSettings.CheatFolder,"vbagx/cheats"); // Path to cheat files
GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, USB, Network (SMB)
sprintf (GCSettings.LoadFolder, "%s/roms", APPFOLDER); // Path to game files
sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files
sprintf (GCSettings.CheatFolder, "%s/cheats", APPFOLDER); // Path to cheat files
GCSettings.AutoLoad = 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.gbaZoomHor = 1.0; // GBA horizontal zoom level