mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 07:04:17 +01:00
Ignore OSC roll-over events if the button is already pressed
This commit is contained in:
parent
560fcd9442
commit
655ca8f89b
@ -151,7 +151,11 @@ class OnScreenControllerView @JvmOverloads constructor(context : Context, attrs
|
|||||||
for (buttonPair in controls.buttonPairs) {
|
for (buttonPair in controls.buttonPairs) {
|
||||||
if (buttonPair.contains(button)) {
|
if (buttonPair.contains(button)) {
|
||||||
for (otherButton in buttonPair) {
|
for (otherButton in buttonPair) {
|
||||||
if (otherButton != button && otherButton.config.enabled && otherButton.isTouched(event.getX(fingerId), event.getY(fingerId))) {
|
if (otherButton.partnerPointerId == -1 &&
|
||||||
|
otherButton != button &&
|
||||||
|
otherButton.config.enabled &&
|
||||||
|
otherButton.isTouched(event.getX(fingerId), event.getY(fingerId))
|
||||||
|
) {
|
||||||
otherButton.partnerPointerId = fingerId
|
otherButton.partnerPointerId = fingerId
|
||||||
if (otherButton.onFingerDown(x, y))
|
if (otherButton.onFingerDown(x, y))
|
||||||
onButtonStateChangedListener?.invoke(otherButton.buttonId, ButtonState.Pressed)
|
onButtonStateChangedListener?.invoke(otherButton.buttonId, ButtonState.Pressed)
|
||||||
|
Loading…
Reference in New Issue
Block a user