mirror of https://github.com/PCSX2/pcsx2.git
Call XInputGetState only when XInputGetExtended is not
This commit is contained in:
parent
a3c6ad636b
commit
c280d69d6f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue