PSP2: Add left pad support for the GUI

This commit is contained in:
Jeffrey Pfau 2015-08-30 19:21:48 -07:00
parent 3d8a3e8cbc
commit ef9bb6ac5c
1 changed files with 5 additions and 4 deletions

View File

@ -44,18 +44,19 @@ static int _pollInput(void) {
input |= 1 << GUI_INPUT_SELECT; input |= 1 << GUI_INPUT_SELECT;
} }
if (pad.buttons & PSP2_CTRL_UP) { if (pad.buttons & PSP2_CTRL_UP || pad.ly < 64) {
input |= 1 << GUI_INPUT_UP; input |= 1 << GUI_INPUT_UP;
} }
if (pad.buttons & PSP2_CTRL_DOWN) { if (pad.buttons & PSP2_CTRL_DOWN || pad.ly >= 192) {
input |= 1 << GUI_INPUT_DOWN; input |= 1 << GUI_INPUT_DOWN;
} }
if (pad.buttons & PSP2_CTRL_LEFT) { if (pad.buttons & PSP2_CTRL_LEFT || pad.lx < 64) {
input |= 1 << GUI_INPUT_LEFT; input |= 1 << GUI_INPUT_LEFT;
} }
if (pad.buttons & PSP2_CTRL_RIGHT) { if (pad.buttons & PSP2_CTRL_RIGHT || pad.lx >= 192) {
input |= 1 << GUI_INPUT_RIGHT; input |= 1 << GUI_INPUT_RIGHT;
} }
return input; return input;
} }