Add option to Enable Dinput along Xinput

This commit is contained in:
LunaMoo committed 2019-03-30 10:37:16 +01:00
1 parent d346d3a8c2
commit 5f119f3bb8
4 files changed
+5 -1

No files matched your search

+1
View File
@@ -783,6 +783,7 @@ static ConfigSetting controlSettings[] = {
ConfigSetting("DInputAnalogInverseMode", &g_Config.iDInputAnalogInverseMode, 0, true, true),
ConfigSetting("DInputAnalogInverseDeadzone", &g_Config.fDInputAnalogInverseDeadzone, 0.0f, true, true),
ConfigSetting("DInputAnalogSensitivity", &g_Config.fDInputAnalogSensitivity, 1.0f, true, true),
ConfigSetting("EnableDInputWithXInput", &g_Config.bEnableDInputWithXInput, false, true, true),
ConfigSetting("XInputAnalogDeadzone", &g_Config.fXInputAnalogDeadzone, 0.24f, true, true),
ConfigSetting("XInputAnalogInverseMode", &g_Config.iXInputAnalogInverseMode, 0, true, true),
+1
View File
@@ -330,6 +330,7 @@ public:
int iDInputAnalogInverseMode;
float fDInputAnalogInverseDeadzone;
float fDInputAnalogSensitivity;
bool bEnableDInputWithXInput;
// We also use the XInput settings as analog settings on other platforms like Android.
float fXInputAnalogDeadzone;
+2
View File
@@ -577,6 +577,8 @@ void GameSettingsScreen::CreateViews() {
if (!g_Config.bSimpleUI) {
#if defined(USING_WIN_UI)
controlsSettings->Add(new CheckBox(&g_Config.bGamepadOnlyFocused, co->T("Ignore gamepads when not focused")));
controlsSettings->Add(new CheckBox(&g_Config.bEnableDInputWithXInput, co->T("Enable Dinput along Xinput","Enable Dinput along Xinput gamepads(might cause problems with gamepads that can use both without manual switch)")));
#endif
auto axisToButton = new PopupSliderChoiceFloat(&g_Config.fAxisBindThreshold, 0.01f, 0.96f, co->T("Axis to button threshold"), 0.05f, screenManager());
controlsSettings->Add(axisToButton);
+1 -1
View File
@@ -240,7 +240,7 @@ int XinputDevice::UpdateState() {
// If we get XInput, skip the others. This might not actually be a good idea,
// and was done to avoid conflicts between DirectInput and XInput.
return anySuccess ? UPDATESTATE_SKIP_PAD : 0;
return anySuccess ? (g_Config.bEnableDInputWithXInput ? 0 : UPDATESTATE_SKIP_PAD) : 0;
}
void XinputDevice::UpdatePad(int pad, const XINPUT_STATE &state) {