add xinput options to launcher
This commit is contained in:
@@ -46,12 +46,16 @@ LPCWSTR COMPONENTS_FILE = COMPONENTS_FILE_STRING.c_str();
|
|||||||
wstring PLAYERDATA_FILE_STRING = PLUGINS_DIR + L"\\playerdata.ini";
|
wstring PLAYERDATA_FILE_STRING = PLUGINS_DIR + L"\\playerdata.ini";
|
||||||
LPCWSTR PLAYERDATA_FILE = PLAYERDATA_FILE_STRING.c_str();
|
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 PATCHES_SECTION = L"patches";
|
||||||
LPCWSTR GRAPHICS_SECTION = L"graphics";
|
LPCWSTR GRAPHICS_SECTION = L"graphics";
|
||||||
LPCWSTR RESOLUTION_SECTION = L"resolution";
|
LPCWSTR RESOLUTION_SECTION = L"resolution";
|
||||||
LPCWSTR LAUNCHER_SECTION = L"launcher";
|
LPCWSTR LAUNCHER_SECTION = L"launcher";
|
||||||
LPCWSTR COMPONENTS_SECTION = L"components";
|
LPCWSTR COMPONENTS_SECTION = L"components";
|
||||||
LPCWSTR PLAYERDATA_SECTION = L"playerdata";
|
LPCWSTR PLAYERDATA_SECTION = L"playerdata";
|
||||||
|
LPCWSTR KEYCONFIG_SECTION = L"keyconfig";
|
||||||
|
|
||||||
int nSkipLauncher = GetPrivateProfileIntW(L"launcher", L"skip", FALSE, CONFIG_FILE);
|
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 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 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),
|
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),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ namespace Launcher {
|
|||||||
PrependFile("[playerdata]\n", PLAYERDATA_FILE);
|
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();
|
this->panel_ScreenRes->SuspendLayout();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user