[retro-gtk/gamepad] Fix retro button index



commit eb4b3cfd835e2eac84eada3278e5da21e43cd999
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Jul 25 15:49:10 2017 +0200

    Fix retro button index

 retro-gtk/input/retro-gamepad.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/retro-gtk/input/retro-gamepad.c b/retro-gtk/input/retro-gamepad.c
index d947c9c..3c0e956 100644
--- a/retro-gtk/input/retro-gamepad.c
+++ b/retro-gtk/input/retro-gamepad.c
@@ -106,7 +106,7 @@ retro_gamepad_button_press_event (RetroGamepad *self,
   if (retro_button == RETRO_JOYPAD_ID_COUNT)
     return;
 
-  RETRO_GAMEPAD_INTERNAL (self)->buttons[button] = G_MAXINT16;
+  RETRO_GAMEPAD_INTERNAL (self)->buttons[retro_button] = G_MAXINT16;
 }
 
 void
@@ -124,7 +124,7 @@ retro_gamepad_button_release_event (RetroGamepad *self,
   if (retro_button == RETRO_JOYPAD_ID_COUNT)
     return;
 
-  RETRO_GAMEPAD_INTERNAL (self)->buttons[button] = 0;
+  RETRO_GAMEPAD_INTERNAL (self)->buttons[retro_button] = 0;
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]