From 60956e579a1c6c79096c07ba0985a9c7962b3a92 Mon Sep 17 00:00:00 2001 From: Daryl Borth Date: Sun, 31 Jan 2021 09:45:26 -0700 Subject: [PATCH] reverse mounting order, fix bug storing save/load method --- README.md | 5 +++++ hbc/meta.xml | 4 ++-- source/filebrowser.cpp | 8 ++++---- source/fileop.cpp | 3 ++- source/menu.cpp | 4 ++-- source/preferences.cpp | 10 +++++----- source/vbagx.h | 2 +- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5162591..b0990e4 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,11 @@ With it you can play GBA/Game Boy Color/Game Boy games on your Wii/GameCube. ## UPDATE HISTORY +[2.4.3 - January 31, 2021] + +* Fixed SD2SP2 issues +* Changed max game image dimensions to 640x480 to support screenshots + [2.4.2 - January 18, 2021] * Compiled with latest devkitPPC/libogc diff --git a/hbc/meta.xml b/hbc/meta.xml index ad6443f..faa8280 100644 --- a/hbc/meta.xml +++ b/hbc/meta.xml @@ -2,8 +2,8 @@ Visual Boy Advance GX Tantric - 2.4.2 - 20210118 + 2.4.3 + 20210131 GBA/GBC/GB Emulator A port of Visual Boy Advance - M to the Wii. diff --git a/source/filebrowser.cpp b/source/filebrowser.cpp index d6532e9..2449a47 100644 --- a/source/filebrowser.cpp +++ b/source/filebrowser.cpp @@ -62,12 +62,12 @@ int autoLoadMethod() device = DEVICE_SD; else if(ChangeInterface(DEVICE_USB, SILENT)) device = DEVICE_USB; + else if(ChangeInterface(DEVICE_SD_PORT2, SILENT)) + device = DEVICE_SD_PORT2; else if(ChangeInterface(DEVICE_SD_SLOTA, SILENT)) device = DEVICE_SD_SLOTA; else if(ChangeInterface(DEVICE_SD_SLOTB, SILENT)) device = DEVICE_SD_SLOTB; - else if(ChangeInterface(DEVICE_SD_PORT2, SILENT)) - device = DEVICE_SD_PORT2; else if(ChangeInterface(DEVICE_DVD, SILENT)) device = DEVICE_DVD; else if(ChangeInterface(DEVICE_SMB, SILENT)) @@ -95,12 +95,12 @@ int autoSaveMethod(bool silent) device = DEVICE_SD; else if(ChangeInterface(DEVICE_USB, SILENT)) device = DEVICE_USB; + else if(ChangeInterface(DEVICE_SD_PORT2, SILENT)) + device = DEVICE_SD_PORT2; else if(ChangeInterface(DEVICE_SD_SLOTA, SILENT)) device = DEVICE_SD_SLOTA; else if(ChangeInterface(DEVICE_SD_SLOTB, SILENT)) device = DEVICE_SD_SLOTB; - else if(ChangeInterface(DEVICE_SD_PORT2, SILENT)) - device = DEVICE_SD_PORT2; else if(ChangeInterface(DEVICE_SMB, SILENT)) device = DEVICE_SMB; else if(!silent) diff --git a/source/fileop.cpp b/source/fileop.cpp index 8205f08..755cfcb 100644 --- a/source/fileop.cpp +++ b/source/fileop.cpp @@ -205,9 +205,9 @@ void UnmountAllFAT() fatUnmount("sd:"); fatUnmount("usb:"); #else + fatUnmount("port2:"); fatUnmount("carda:"); fatUnmount("cardb:"); - fatUnmount("port2:"); #endif } @@ -296,6 +296,7 @@ void MountAllFAT() MountFAT(DEVICE_SD, SILENT); MountFAT(DEVICE_USB, SILENT); #else + MountFAT(DEVICE_SD_PORT2, SILENT); MountFAT(DEVICE_SD_SLOTA, SILENT); MountFAT(DEVICE_SD_SLOTB, SILENT); #endif diff --git a/source/menu.cpp b/source/menu.cpp index 378559e..4be35d4 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -3782,9 +3782,9 @@ static int MenuSettingsFile() #endif // correct load/save methods out of bounds - if(GCSettings.LoadMethod > 6) + if(GCSettings.LoadMethod > 7) GCSettings.LoadMethod = 0; - if(GCSettings.SaveMethod > 6) + if(GCSettings.SaveMethod > 7) GCSettings.SaveMethod = 0; if (GCSettings.LoadMethod == DEVICE_AUTO) sprintf (options.value[0],"Auto Detect"); diff --git a/source/preferences.cpp b/source/preferences.cpp index 3dd0821..b678b06 100644 --- a/source/preferences.cpp +++ b/source/preferences.cpp @@ -589,9 +589,9 @@ decodePalsData () ***************************************************************************/ void FixInvalidSettings() { - if(GCSettings.LoadMethod > 6) + if(GCSettings.LoadMethod > 7) GCSettings.LoadMethod = DEVICE_AUTO; - if(GCSettings.SaveMethod > 6) + if(GCSettings.SaveMethod > 7) GCSettings.SaveMethod = DEVICE_AUTO; if(!(GCSettings.gbaZoomHor > 0.5 && GCSettings.gbaZoomHor < 1.5)) GCSettings.gbaZoomHor = 1.0; @@ -817,9 +817,9 @@ bool LoadPrefs() sprintf(filepath[4], "usb:/%s", APPFOLDER); #else numDevices = 3; - sprintf(filepath[0], "carda:/%s", APPFOLDER); - sprintf(filepath[1], "cardb:/%s", APPFOLDER); - sprintf(filepath[2], "port2:/%s", APPFOLDER); + sprintf(filepath[0], "port2:/%s", APPFOLDER); + sprintf(filepath[1], "carda:/%s", APPFOLDER); + sprintf(filepath[2], "cardb:/%s", APPFOLDER); #endif for(int i=0; i