add xinput options to launcher

This commit is contained in:
somewhatlurker
2019-09-14 15:19:19 +10:00
parent d43ded2060
commit b69ddd4cf1
2 changed files with 14 additions and 0 deletions
@@ -46,12 +46,16 @@ LPCWSTR COMPONENTS_FILE = COMPONENTS_FILE_STRING.c_str();
wstring PLAYERDATA_FILE_STRING = PLUGINS_DIR + L"\\playerdata.ini";
LPCWSTR PLAYERDATA_FILE = PLAYERDATA_FILE_STRING.c_str();
wstring KEYCONFIG_FILE_STRING = PLUGINS_DIR + L"\\keyconfig.ini";
LPCWSTR KEYCONFIG_FILE = KEYCONFIG_FILE_STRING.c_str();
LPCWSTR PATCHES_SECTION = L"patches";
LPCWSTR GRAPHICS_SECTION = L"graphics";
LPCWSTR RESOLUTION_SECTION = L"resolution";
LPCWSTR LAUNCHER_SECTION = L"launcher";
LPCWSTR COMPONENTS_SECTION = L"components";
LPCWSTR PLAYERDATA_SECTION = L"playerdata";
LPCWSTR KEYCONFIG_SECTION = L"keyconfig";
int nSkipLauncher = GetPrivateProfileIntW(L"launcher", L"skip", FALSE, CONFIG_FILE);
@@ -178,6 +182,10 @@ ConfigOptionBase* optionsArray[] = {
new NumericOption(L"frm.motion.rate", GRAPHICS_SECTION, CONFIG_FILE, L"FRM Motion Rate:", L"Sets the motion rate (fps) for the Frame Rate Manager component.\nLarger values should be smoother, but more CPU intensive and possibly buggier.", 300, 1, INT_MAX),
new OptionMetaSpacer(8),
new BooleanOption(L"rumble", KEYCONFIG_SECTION, KEYCONFIG_FILE, L"XInput Rumble", L"Enables rumble during chainslides.", true, true),
new NumericOption(L"xinput_preferred", KEYCONFIG_SECTION, KEYCONFIG_FILE, L"XInput Controller Num:", L"Sets the preferred XInput controller.\nIf unavailable, the next connected controller is used.", 0, 0, 3),
new OptionMetaSpacer(8),
new StringOption(L"command_line", LAUNCHER_SECTION, CONFIG_FILE, L"Command Line:", L"Allows setting command line parameters for the game when using the launcher.\nDisabling the launcher will bypass this.", L"", false),
};
+6
View File
@@ -44,6 +44,12 @@ namespace Launcher {
PrependFile("[playerdata]\n", PLAYERDATA_FILE);
}
// if keyconfig.ini has no section name, add one
if (!IsLineInFile("[keyconfig]", KEYCONFIG_FILE))
{
PrependFile("[keyconfig]\n", KEYCONFIG_FILE);
}
this->panel_ScreenRes->SuspendLayout();