mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 23:40:39 +00:00
Merge pull request #1197 from unknownbrackets/pad-fix
Skip pads if their analog is not set
This commit is contained in:
commit
ab6d5e3731
@ -150,6 +150,8 @@ int DinputDevice::UpdateState(InputState &input_state)
|
||||
}
|
||||
}
|
||||
|
||||
if (js.lX != 0.0f || js.lY != 0.0f)
|
||||
return UPDATESTATE_SKIP_NEXT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
#define PUSH_BACK(Cls) do { list.push_back(std::shared_ptr<InputDevice>(new Cls())); } while (0)
|
||||
std::list<std::shared_ptr<InputDevice>> getInputDevices() {
|
||||
std::list<std::shared_ptr<InputDevice>> list;
|
||||
PUSH_BACK(KeyboardDevice);
|
||||
PUSH_BACK(XinputDevice);
|
||||
PUSH_BACK(DinputDevice);
|
||||
PUSH_BACK(KeyboardDevice);
|
||||
return list;
|
||||
}
|
||||
|
@ -55,7 +55,9 @@ int XinputDevice::UpdateState(InputState &input_state) {
|
||||
|
||||
// If there's an XInput pad, skip following pads. This prevents DInput and XInput
|
||||
// from colliding.
|
||||
return UPDATESTATE_SKIP_NEXT;
|
||||
if (left.x != 0.0f || left.y != 0.0f)
|
||||
return UPDATESTATE_SKIP_NEXT;
|
||||
return 0;
|
||||
} else {
|
||||
// wait check_delay frames before polling the controller again
|
||||
this->gamepad_idx = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user