From f24cf9640bd16a7ef6890762d0a867d712f159d9 Mon Sep 17 00:00:00 2001 From: rsn8887 Date: Mon, 26 Dec 2016 14:37:52 -0600 Subject: [PATCH] Vita - bugfix: the virtual keyboard sometimes send joystick button presses to the emulator when selecting keys --- src/od-joy.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/od-joy.cpp b/src/od-joy.cpp index 1a44265..11442db 100755 --- a/src/od-joy.cpp +++ b/src/od-joy.cpp @@ -356,16 +356,29 @@ void read_joystick(int nr, unsigned int *dir, int *button) } #ifdef __PSP2__ //we know the Vita has many buttons available so use those if (buttonX) + { vkbd_move=VKBD_BUTTON; + buttonX = 0; + *button = 0; + } else if (buttonY) + { vkbd_move=VKBD_BUTTON_SHIFT; + buttonY = 0; + *button = 0; + } else if (buttonA) - vkbd_move=VKBD_BUTTON_BACKSPACE; + { + vkbd_move=VKBD_BUTTON_BACKSPACE; + buttonA = 0; + *button = 0; + } #else // in other cases where those buttons might not be available, use the amiga joystick if (*button || buttonX ) { vkbd_move=VKBD_BUTTON; - *button=0; + buttonX = 0; + *button = 0; } #endif else //button release, make shift toggle possible again.