From c81ac090c93feba427ee65469aa7d4ed57b38742 Mon Sep 17 00:00:00 2001 From: Sean Date: Tue, 22 Apr 2014 18:34:16 -0400 Subject: [PATCH] Clarify code with comments --- .../dolphinemu/emulation/overlay/InputOverlay.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/emulation/overlay/InputOverlay.java b/Source/Android/src/org/dolphinemu/dolphinemu/emulation/overlay/InputOverlay.java index 27cf902ea4..9dffa00f5b 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/emulation/overlay/InputOverlay.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/emulation/overlay/InputOverlay.java @@ -123,7 +123,10 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener { if (button.getBounds().contains((int)event.getX(), (int)event.getY())) NativeLibrary.onTouchEvent(0, button.getId(), buttonState); - else // Release button after touch leaves boundaries + else + // Because the above code only changes the state for the button that is being touched, sliding off the + // button does not allow for it to be released. Release the button as soon as the touch coordinates leave + // the button bounds. NativeLibrary.onTouchEvent(0, button.getId(), ButtonState.RELEASED); }