mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 03:52:48 +00:00
Fix crash in virtual controller if a release event happens without a press
This commit is contained in:
parent
93b0073467
commit
9417908848
@ -190,9 +190,15 @@ public class DigitalButton extends VirtualControllerElement {
|
|||||||
for (DigitalButtonListener listener : listeners) {
|
for (DigitalButtonListener listener : listeners) {
|
||||||
listener.onRelease();
|
listener.onRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We may be called for a release without a prior click
|
||||||
|
if (timerLongClick != null) {
|
||||||
timerLongClick.cancel();
|
timerLongClick.cancel();
|
||||||
|
}
|
||||||
|
if (longClickTimerTask != null) {
|
||||||
longClickTimerTask.cancel();
|
longClickTimerTask.cancel();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onElementTouchEvent(MotionEvent event) {
|
public boolean onElementTouchEvent(MotionEvent event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user