From 75ecc47307d797843eaa49d324285d4ea7187a65 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Fri, 4 Sep 2015 20:35:42 -0700 Subject: [PATCH] Bugfix : show correct current button character --- src/video/gltouchjoy.c | 2 ++ src/video/gltouchjoy_kpad.c | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/video/gltouchjoy.c b/src/video/gltouchjoy.c index 3910e835..9624b2ed 100644 --- a/src/video/gltouchjoy.c +++ b/src/video/gltouchjoy.c @@ -667,6 +667,8 @@ static void gltouchjoy_setTouchButtonTypes( currButtonDisplayChar = MOUSETEXT_CLOSEDAPPLE; } else if (touchDownChar == TOUCH_BOTH) { currButtonDisplayChar = '+'; + } else if (touchDownScancode < 0) { + currButtonDisplayChar = ' '; } _setup_button_object_with_char(currButtonDisplayChar); } diff --git a/src/video/gltouchjoy_kpad.c b/src/video/gltouchjoy_kpad.c index fd9a3e64..8bc608f9 100644 --- a/src/video/gltouchjoy_kpad.c +++ b/src/video/gltouchjoy_kpad.c @@ -157,10 +157,6 @@ static void touchkpad_keyboardReadCallback(void) { } } - if (fired == REPEAT_BUTTON) { - kpad.buttonDrawCallback(kpad.currButtonDisplayChar); - } - bool lockedAxis = _callback_sourceTryLock(&kpad.axisLock); if (lockedAxis) { if (fired == REPEAT_AXIS || fired == REPEAT_AXIS_ALT) { @@ -427,6 +423,7 @@ static void _set_current_button_state(touchjoy_button_type_t theButtonChar, int kpad.currButtonDisplayChar = ' '; kpad.scancodes[REPEAT_BUTTON] = -1; } + kpad.buttonDrawCallback(kpad.currButtonDisplayChar); } static void touchkpad_buttonDown(void) {