change snes9x to snes9xgx

This commit is contained in:
dborth 2009-12-23 07:21:05 +00:00
parent db140261aa
commit aefba6de0d
3 changed files with 45 additions and 21 deletions

View File

@ -435,8 +435,13 @@ LoadPrefsFromMethod (char * path)
FreeSaveBuffer ();
if(retval)
{
strcpy(prefpath, path);
if(appPath[0] == 0)
strcpy(appPath, prefpath);
}
return retval;
}
@ -452,14 +457,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);
@ -478,6 +485,33 @@ bool LoadPrefs()
if(prefFound)
FixInvalidSettings();
// rename snes9x to snes9xgx
if(GCSettings.LoadMethod == DEVICE_SD)
{
if(ChangeInterface(DEVICE_SD, NOTSILENT) && diropen("sd:/snes9x"))
rename("sd:/snes9x", "sd:/snes9xgx");
}
else if(GCSettings.LoadMethod == DEVICE_USB)
{
if(ChangeInterface(DEVICE_USB, NOTSILENT) && diropen("usb:/snes9x"))
rename("usb:/snes9x", "usb:/snes9xgx");
}
else if(GCSettings.LoadMethod == DEVICE_SMB)
{
if(ChangeInterface(DEVICE_SMB, NOTSILENT) && diropen("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");
return prefFound;
}

View File

@ -61,28 +61,18 @@ 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,"snes9x/roms"); // Path to game files
sprintf (GCSettings.SaveFolder,"snes9x/saves"); // Path to save files
sprintf (GCSettings.CheatFolder,"snes9x/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.Controller = CTRL_PAD2;
GCSettings.videomode = 0; // automatic video mode detection

View File

@ -21,7 +21,7 @@
#define APPNAME "Snes9x GX"
#define APPVERSION "4.1.4"
#define APPFOLDER "snes9x"
#define APPFOLDER "snes9xgx"
#define PREF_FILE_NAME "settings.xml"
#define NOTSILENT 0