sd gecko fixes

This commit is contained in:
dborth 2010-06-04 21:50:24 +00:00
parent 118ca267c5
commit 982db442c1
2 changed files with 28 additions and 8 deletions

View File

@ -3382,11 +3382,15 @@ static int MenuSettingsFile()
{ {
firstRun = false; firstRun = false;
// some load/save devices are not implemented - here's where we skip them // 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 #ifdef HW_DOL
if(GCSettings.LoadMethod == DEVICE_SD)
GCSettings.LoadMethod++;
if(GCSettings.SaveMethod == DEVICE_SD)
GCSettings.SaveMethod++;
if(GCSettings.LoadMethod == DEVICE_USB) if(GCSettings.LoadMethod == DEVICE_USB)
GCSettings.LoadMethod++; GCSettings.LoadMethod++;
if(GCSettings.SaveMethod == DEVICE_USB) if(GCSettings.SaveMethod == DEVICE_USB)
@ -3405,10 +3409,22 @@ static int MenuSettingsFile()
GCSettings.SaveMethod++; GCSettings.SaveMethod++;
#endif #endif
// correct load/save devices out of bounds // don't allow SD Gecko on Wii
if(GCSettings.LoadMethod > 4) #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 > 6)
GCSettings.LoadMethod = 0; GCSettings.LoadMethod = 0;
if(GCSettings.SaveMethod > 4) if(GCSettings.SaveMethod > 6)
GCSettings.SaveMethod = 0; GCSettings.SaveMethod = 0;
if (GCSettings.LoadMethod == DEVICE_AUTO) sprintf (options.value[0],"Auto Detect"); if (GCSettings.LoadMethod == DEVICE_AUTO) sprintf (options.value[0],"Auto Detect");
@ -3416,11 +3432,15 @@ static int MenuSettingsFile()
else if (GCSettings.LoadMethod == DEVICE_USB) sprintf (options.value[0],"USB"); 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_DVD) sprintf (options.value[0],"DVD");
else if (GCSettings.LoadMethod == DEVICE_SMB) sprintf (options.value[0],"Network"); 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"); 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_SD) sprintf (options.value[1],"SD");
else if (GCSettings.SaveMethod == DEVICE_USB) sprintf (options.value[1],"USB"); 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_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[2], 35, "%s", GCSettings.LoadFolder);
snprintf (options.value[3], 35, "%s", GCSettings.SaveFolder); snprintf (options.value[3], 35, "%s", GCSettings.SaveFolder);

View File

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