sd gecko fixes

This commit is contained in:
dborth 2010-06-04 21:50:34 +00:00
parent f951869f64
commit 1963865ec1
2 changed files with 26 additions and 6 deletions

View File

@ -3425,10 +3425,14 @@ static int MenuSettingsFile()
firstRun = false;
// some load/save methods are not implemented - here's where we skip them
// they need to be skipped in the order they were enumerated in snes9xGX.h
// they need to be skipped in the order they were enumerated
// no USB ports on GameCube
// no SD/USB ports on GameCube
#ifdef HW_DOL
if(GCSettings.LoadMethod == DEVICE_SD)
GCSettings.LoadMethod++;
if(GCSettings.SaveMethod == DEVICE_SD)
GCSettings.SaveMethod++;
if(GCSettings.LoadMethod == DEVICE_USB)
GCSettings.LoadMethod++;
if(GCSettings.SaveMethod == DEVICE_USB)
@ -3447,10 +3451,22 @@ static int MenuSettingsFile()
GCSettings.SaveMethod++;
#endif
// don't allow SD Gecko on Wii
#ifdef HW_RVL
if(GCSettings.LoadMethod == DEVICE_SD_SLOTA)
GCSettings.LoadMethod++;
if(GCSettings.SaveMethod == DEVICE_SD_SLOTA)
GCSettings.SaveMethod++;
if(GCSettings.LoadMethod == DEVICE_SD_SLOTB)
GCSettings.LoadMethod++;
if(GCSettings.SaveMethod == DEVICE_SD_SLOTB)
GCSettings.SaveMethod++;
#endif
// correct load/save methods out of bounds
if(GCSettings.LoadMethod > 4)
if(GCSettings.LoadMethod > 6)
GCSettings.LoadMethod = 0;
if(GCSettings.SaveMethod > 4)
if(GCSettings.SaveMethod > 6)
GCSettings.SaveMethod = 0;
if (GCSettings.LoadMethod == DEVICE_AUTO) sprintf (options.value[0],"Auto Detect");
@ -3458,11 +3474,15 @@ static int MenuSettingsFile()
else if (GCSettings.LoadMethod == DEVICE_USB) sprintf (options.value[0],"USB");
else if (GCSettings.LoadMethod == DEVICE_DVD) sprintf (options.value[0],"DVD");
else if (GCSettings.LoadMethod == DEVICE_SMB) sprintf (options.value[0],"Network");
else if (GCSettings.LoadMethod == DEVICE_SD_SLOTA) sprintf (options.value[0],"SD Gecko Slot A");
else if (GCSettings.LoadMethod == DEVICE_SD_SLOTB) sprintf (options.value[0],"SD Gecko Slot B");
if (GCSettings.SaveMethod == DEVICE_AUTO) sprintf (options.value[1],"Auto Detect");
else if (GCSettings.SaveMethod == DEVICE_SD) sprintf (options.value[1],"SD");
else if (GCSettings.SaveMethod == DEVICE_USB) sprintf (options.value[1],"USB");
else if (GCSettings.SaveMethod == DEVICE_SMB) sprintf (options.value[1],"Network");
else if (GCSettings.SaveMethod == DEVICE_SD_SLOTA) sprintf (options.value[1],"SD Gecko Slot A");
else if (GCSettings.SaveMethod == DEVICE_SD_SLOTB) sprintf (options.value[1],"SD Gecko Slot B");
snprintf (options.value[2], 35, "%s", GCSettings.LoadFolder);
snprintf (options.value[3], 35, "%s", GCSettings.SaveFolder);

View File

@ -358,9 +358,9 @@ decodePrefsData ()
***************************************************************************/
void FixInvalidSettings()
{
if(GCSettings.LoadMethod > 4)
if(GCSettings.LoadMethod > 6)
GCSettings.LoadMethod = DEVICE_AUTO;
if(GCSettings.SaveMethod > 4)
if(GCSettings.SaveMethod > 6)
GCSettings.SaveMethod = DEVICE_AUTO;
if(!(GCSettings.zoomHor > 0.5 && GCSettings.zoomHor < 1.5))
GCSettings.zoomHor = 1.0;