From f886f16bacba015c1068f0306f3984f0d9d9d41f Mon Sep 17 00:00:00 2001 From: littleguy77 Date: Tue, 15 Jan 2013 20:03:29 -0500 Subject: [PATCH] front: Fix range check on TouchController. --- src/paulscode/android/mupen64plusae/input/TouchController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/paulscode/android/mupen64plusae/input/TouchController.java b/src/paulscode/android/mupen64plusae/input/TouchController.java index ff96c9cbbe..e787d2bd09 100644 --- a/src/paulscode/android/mupen64plusae/input/TouchController.java +++ b/src/paulscode/android/mupen64plusae/input/TouchController.java @@ -245,7 +245,7 @@ private void processButtonTouch( boolean touched, int xLocation, int yLocation, { // Check if this pointer was already mapped to a button int prevIndex = mPointerMap.get( pid ); - if( prevIndex > 0 && prevIndex != index ) + if( prevIndex >= 0 && prevIndex != index ) { // Release the previous button setTouchState( prevIndex, false ); @@ -258,6 +258,7 @@ private void processButtonTouch( boolean touched, int xLocation, int yLocation, setTouchState( index, touched ); } } + /** * Sets the state of a button, and handles the D-Pad diagonals. *