Skip to content

Commit

Permalink
Vita - bugfix: the virtual keyboard sometimes send joystick button pr…
Browse files Browse the repository at this point in the history
…esses to the emulator when selecting keys
  • Loading branch information
rsn8887 committed Dec 26, 2016
1 parent b0c17a0 commit f24cf96
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/od-joy.cpp
Expand Up @@ -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.
Expand Down

0 comments on commit f24cf96

Please sign in to comment.