sd gecko fixes

This commit is contained in:
dborth 2010-06-04 21:50:44 +00:00
parent ae34742e6d
commit 464275e3d9
2 changed files with 26 additions and 6 deletions

View File

@ -3142,10 +3142,14 @@ static int MenuSettingsFile()
firstRun = false; firstRun = false;
// some load/save methods 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)
@ -3164,10 +3168,22 @@ static int MenuSettingsFile()
GCSettings.SaveMethod++; GCSettings.SaveMethod++;
#endif #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 // correct load/save methods out of bounds
if(GCSettings.LoadMethod > 4) 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");
@ -3175,11 +3191,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

@ -556,9 +556,9 @@ decodePalsData ()
***************************************************************************/ ***************************************************************************/
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.gbaZoomHor > 0.5 && GCSettings.gbaZoomHor < 1.5)) if(!(GCSettings.gbaZoomHor > 0.5 && GCSettings.gbaZoomHor < 1.5))
GCSettings.gbaZoomHor = 1.0; GCSettings.gbaZoomHor = 1.0;