mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-13 17:50:13 +01:00
Call XInputGetState only when XInputGetExtended is not
This commit is contained in:
1 parent
a3c6ad636b
commit
c280d69d6f
1 file changed
+6
-5
@@ -161,13 +161,14 @@ public:
|
||||
{
|
||||
if (!active)
|
||||
return 0;
|
||||
XINPUT_STATE state;
|
||||
if (ERROR_SUCCESS != pXInputGetStateEx(index, &state)) {
|
||||
Deactivate();
|
||||
return 0;
|
||||
}
|
||||
SCP_EXTN pressure;
|
||||
if (!pXInputGetExtended || (ERROR_SUCCESS != pXInputGetExtended(index, &pressure))) {
|
||||
XINPUT_STATE state;
|
||||
if (ERROR_SUCCESS != pXInputGetStateEx(index, &state)) {
|
||||
Deactivate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int buttons = state.Gamepad.wButtons;
|
||||
for (int i = 0; i < 15; i++) {
|
||||
physicalControlState[i] = ((buttons >> physicalControls[i].id) & 1) << 16;
|
||||
|
||||
Reference in new issue
Block a user