add more pref file search locations

This commit is contained in:
dborth 2009-12-23 07:23:08 +00:00
parent 4b39e3a509
commit ac50132052
2 changed files with 16 additions and 19 deletions

View File

@ -63,6 +63,7 @@ void FixInvalidSettings()
void
DefaultSettings ()
{
memset (&GCSettings, 0, sizeof (GCSettings));
ResetControls(); // controller button mappings
GCSettings.currpal = 1; // color palette
@ -90,21 +91,10 @@ DefaultSettings ()
GCSettings.Rumble = 1;
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,"fceugx/roms"); // Path to game files
sprintf (GCSettings.SaveFolder,"fceugx/saves"); // Path to save files
sprintf (GCSettings.CheatFolder,"fceugx/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; // Auto Load RAM
GCSettings.AutoSave = 1; // Auto Save RAM
// 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;
}

View File

@ -437,8 +437,13 @@ LoadPrefsFromMethod (char * path)
FreeSaveBuffer ();
if(retval)
{
strcpy(prefpath, path);
if(appPath[0] == 0)
strcpy(appPath, prefpath);
}
return retval;
}
@ -454,14 +459,16 @@ bool LoadPrefs()
return true;
bool prefFound = false;
char filepath[4][MAXPATHLEN];
char filepath[5][MAXPATHLEN];
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);