Add "Enable Turbo Mode" toggle to the Video Settings menu (based on InfiniteBlueGX's code) (#441)

* Add "Enable Turbo Mode" toggle to the Video Settings menu

* Add "Enable Turbo Mode" toggle to the Video Settings menu

* Add "Enable Turbo Mode" toggle to the Video Settings menu

* Add "Enable Turbo Mode" toggle to the Video Settings menu

* Add Spanish translation to "Enable Turbo Mode" option

* forgot to update setting order for Enable Turbo Mode option (fixes not appearing On/Off option)
This commit is contained in:
saulfabreg Wii VC Project 2022-05-20 14:07:39 -05:00 committed by GitHub
parent ea1ad3cffe
commit 48d499c564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 6 deletions

View File

@ -880,11 +880,13 @@ static u32 DecodeJoy(unsigned short pad)
u32 J = StandardMovement(pad); u32 J = StandardMovement(pad);
// Turbo feature // Turbo feature
if(userInput[0].pad.substickX > 70 || if (GCSettings.TurboModeEnabled == 1)
userInput[0].WPAD_Stick(1,0) > 70 || {
userInput[0].wiidrcdata.substickX > 45) if(userInput[0].pad.substickX > 70 ||
J |= VBA_SPEED; userInput[0].WPAD_Stick(1,0) > 70 ||
userInput[0].wiidrcdata.substickX > 45)
J |= VBA_SPEED;
}
// Report pressed buttons (gamepads) // Report pressed buttons (gamepads)
u32 pad_btns_h = userInput[pad].pad.btns_h; // GCN u32 pad_btns_h = userInput[pad].pad.btns_h; // GCN
u32 wiidrcp_btns_h = userInput[pad].wiidrcdata.btns_h; u32 wiidrcp_btns_h = userInput[pad].wiidrcdata.btns_h;

View File

@ -181,6 +181,9 @@ msgstr "Holandés"
msgid "Enabled" msgid "Enabled"
msgstr "Activado" msgstr "Activado"
msgid "Enable Turbo Mode"
msgstr "Activar Modo Turbo"
msgid "English" msgid "English"
msgstr "Inglés" msgstr "Inglés"

View File

@ -3098,6 +3098,7 @@ static int MenuSettingsVideo()
sprintf(options.name[i++], "GB Mono Colorization"); sprintf(options.name[i++], "GB Mono Colorization");
sprintf(options.name[i++], "GB Palette"); sprintf(options.name[i++], "GB Palette");
sprintf(options.name[i++], "GBA Frameskip"); sprintf(options.name[i++], "GBA Frameskip");
sprintf(options.name[i++], "Enable Turbo Mode");
options.length = i; options.length = i;
for(i=0; i < options.length; i++) for(i=0; i < options.length; i++)
@ -3208,6 +3209,11 @@ static int MenuSettingsVideo()
case 8: case 8:
GCSettings.gbaFrameskip ^= 1; GCSettings.gbaFrameskip ^= 1;
break; break;
case 9:
GCSettings.TurboModeEnabled++;
if (GCSettings.TurboModeEnabled > 1)
GCSettings.TurboModeEnabled = 0;
break;
} }
if(ret >= 0 || firstRun) if(ret >= 0 || firstRun)
@ -3289,7 +3295,7 @@ static int MenuSettingsVideo()
sprintf (options.value[8], "On"); sprintf (options.value[8], "On");
else else
sprintf (options.value[8], "Off"); sprintf (options.value[8], "Off");
sprintf (options.value[9], "%s", GCSettings.TurboModeEnabled == 1 ? "On" : "Off");
optionBrowser.TriggerUpdate(); optionBrowser.TriggerUpdate();
} }

View File

@ -197,6 +197,7 @@ preparePrefsData ()
createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift)); createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift));
createXMLSetting("colorize", "Colorize Mono Gameboy", toStr(GCSettings.colorize)); createXMLSetting("colorize", "Colorize Mono Gameboy", toStr(GCSettings.colorize));
createXMLSetting("gbaFrameskip", "GBA Frameskip", toStr(GCSettings.gbaFrameskip)); createXMLSetting("gbaFrameskip", "GBA Frameskip", toStr(GCSettings.gbaFrameskip));
createXMLSetting("TurboModeEnabled", "Turbo Mode Enabled", toStr(GCSettings.TurboModeEnabled));
createXMLSection("Menu", "Menu Settings"); createXMLSection("Menu", "Menu Settings");
@ -512,6 +513,7 @@ decodePrefsData ()
loadXMLSetting(&GCSettings.yshift, "yshift"); loadXMLSetting(&GCSettings.yshift, "yshift");
loadXMLSetting(&GCSettings.colorize, "colorize"); loadXMLSetting(&GCSettings.colorize, "colorize");
loadXMLSetting(&GCSettings.gbaFrameskip, "gbaFrameskip"); loadXMLSetting(&GCSettings.gbaFrameskip, "gbaFrameskip");
loadXMLSetting(&GCSettings.TurboModeEnabled, "TurboModeEnabled");
// Menu Settings // Menu Settings
@ -658,6 +660,7 @@ DefaultSettings ()
GCSettings.yshift = 0; // vertical video shift GCSettings.yshift = 0; // vertical video shift
GCSettings.colorize = 0; // Colorize mono gameboy games GCSettings.colorize = 0; // Colorize mono gameboy games
GCSettings.gbaFrameskip = 1; // Turn auto-frameskip on for GBA games GCSettings.gbaFrameskip = 1; // Turn auto-frameskip on for GBA games
GCSettings.TurboModeEnabled = 1; // Enabled by default
GCSettings.WiimoteOrientation = 0; GCSettings.WiimoteOrientation = 0;
GCSettings.ExitAction = 0; GCSettings.ExitAction = 0;

View File

@ -95,6 +95,7 @@ struct SGCSettings
int Rumble; int Rumble;
int language; int language;
int PreviewImage; int PreviewImage;
int TurboModeEnabled; // 0 - disabled, 1 - enabled
int AutoloadGame; int AutoloadGame;
int OffsetMinutesUTC; // Used for clock on MBC3 and TAMA5 int OffsetMinutesUTC; // Used for clock on MBC3 and TAMA5