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

* 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

* Update README.md

* Update README.md

* Add Spanish translation to "Enable Turbo Mode" option
This commit is contained in:
saulfabreg Wii VC Project 2022-05-20 14:11:46 -05:00 committed by GitHub
parent e75c35e363
commit 9b1bf3ad50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 5 deletions

View File

@ -121,6 +121,7 @@ struct SGCSettings
int Rumble;
int language;
int PreviewImage;
int TurboModeEnabled; // 0 - disabled, 1 - enabled
};
void ExitApp();

View File

@ -721,6 +721,9 @@ msgstr "Desactivado"
msgid "distributed, or modified under the terms of the"
msgstr "distribuido, o modificado bajo los términos de"
msgid "Enable Turbo Mode"
msgstr "Activar Modo Turbo"
msgid "FDS BIOS file is invalid!"
msgstr "¡Archivo de BIOS de FDS inválido!"

View File

@ -3319,6 +3319,7 @@ static int MenuSettingsVideo()
sprintf(options.name[i++], "Zapper Crosshair");
sprintf(options.name[i++], "Sprite Limit");
sprintf(options.name[i++], "Video Mode");
sprintf(options.name[i++], "Enable Turbo Mode");
options.length = i;
for(i=0; i < options.length; i++)
@ -3417,6 +3418,11 @@ static int MenuSettingsVideo()
if(GCSettings.videomode > 4)
GCSettings.videomode = 0;
break;
case 10:
GCSettings.TurboModeEnabled++;
if (GCSettings.TurboModeEnabled > 1)
GCSettings.TurboModeEnabled = 0;
break;
}
if(ret >= 0 || firstRun)
@ -3476,6 +3482,7 @@ static int MenuSettingsVideo()
case 4:
sprintf (options.value[9], "PAL (60Hz)"); break;
}
sprintf (options.value[10], "%s", GCSettings.TurboModeEnabled == 1 ? "On" : "Off");
optionBrowser.TriggerUpdate();
}

View File

@ -631,11 +631,13 @@ void GetJoy()
// Turbo mode
// RIGHT on c-stick and on classic ctrlr right joystick
if(userInput[0].pad.substickX > 70 || userInput[0].WPAD_StickX(1) > 70 || userInput[0].wiidrcdata.substickX > 45)
turbomode = 1;
else
turbomode = 0;
if (GCSettings.TurboModeEnabled == 1)
{
if(userInput[0].pad.substickX > 70 || userInput[0].WPAD_StickX(1) > 70 || userInput[0].wiidrcdata.substickX > 45)
turbomode = 1;
else
turbomode = 0;
}
// request to go back to menu
if(MenuRequested())
ScreenshotRequested = 1; // go to the menu

View File

@ -155,6 +155,7 @@ preparePrefsData ()
createXMLSetting("hideoverscan", "Video Cropping", toStr(GCSettings.hideoverscan));
createXMLSetting("xshift", "Horizontal Video Shift", toStr(GCSettings.xshift));
createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift));
createXMLSetting("TurboModeEnabled", "Turbo Mode Enabled", toStr(GCSettings.TurboModeEnabled));
createXMLSection("Menu", "Menu Settings");
@ -329,6 +330,7 @@ decodePrefsData ()
loadXMLSetting(&GCSettings.hideoverscan, "hideoverscan");
loadXMLSetting(&GCSettings.xshift, "xshift");
loadXMLSetting(&GCSettings.yshift, "yshift");
loadXMLSetting(&GCSettings.TurboModeEnabled, "TurboModeEnabled");
// Menu Settings
@ -456,6 +458,7 @@ DefaultSettings ()
sprintf (GCSettings.ArtworkFolder, "%s/artwork", APPFOLDER); // Path to artwork files
GCSettings.AutoLoad = 1; // Auto Load RAM
GCSettings.AutoSave = 1; // Auto Save RAM
GCSettings.TurboModeEnabled = 1; // Enabled by default
}
/****************************************************************************