mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-30 19:24:23 +01:00
Make TouchButton not always override other input. Modify mappings.
This commit is contained in:
1 parent
8fd4f592ad
commit
1556328129
2 files changed
+8
-7
No files matched your search
@@ -16,6 +16,7 @@ TouchButton::TouchButton(const Atlas *atlas, int imageIndex, int overlayImageInd
|
||||
|
||||
void TouchButton::update(InputState &input_state)
|
||||
{
|
||||
bool oldIsDown = isDown_;
|
||||
isDown_ = false;
|
||||
for (int i = 0; i < MAX_POINTERS; i++) {
|
||||
if (input_state.pointer_down[i] && isInside(input_state.pointer_x[i], input_state.pointer_y[i]))
|
||||
@@ -24,7 +25,7 @@ void TouchButton::update(InputState &input_state)
|
||||
|
||||
if (isDown_) {
|
||||
input_state.pad_buttons |= button_;
|
||||
} else {
|
||||
} else if (oldIsDown && !isDown_) {
|
||||
input_state.pad_buttons &= ~button_;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user