From 1963865ec18de80f34e450ad2fe4eb8560f9a19c Mon Sep 17 00:00:00 2001 From: dborth Date: Fri, 4 Jun 2010 21:50:34 +0000 Subject: [PATCH] sd gecko fixes --- source/menu.cpp | 28 ++++++++++++++++++++++++---- source/preferences.cpp | 4 ++-- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/source/menu.cpp b/source/menu.cpp index dd5bd59..43272f4 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -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); diff --git a/source/preferences.cpp b/source/preferences.cpp index 5ff0a37..8936935 100644 --- a/source/preferences.cpp +++ b/source/preferences.cpp @@ -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;