all repos — mgba @ ef9bb6ac5c0014b30f32a654e41955c1c74ea545

mGBA Game Boy Advance Emulator

PSP2: Add left pad support for the GUI
Jeffrey Pfau jeffrey@endrift.com
Sun, 30 Aug 2015 19:21:48 -0700
commit

ef9bb6ac5c0014b30f32a654e41955c1c74ea545

parent

3d8a3e8cbcf95f05247067905a296d91b0c64067

1 files changed, 5 insertions(+), 4 deletions(-)

jump to
M src/platform/psp2/main.csrc/platform/psp2/main.c

@@ -44,18 +44,19 @@ if (pad.buttons & PSP2_CTRL_CROSS) {

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; } - if (pad.buttons & PSP2_CTRL_DOWN) { + if (pad.buttons & PSP2_CTRL_DOWN || pad.ly >= 192) { 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; } - if (pad.buttons & PSP2_CTRL_RIGHT) { + if (pad.buttons & PSP2_CTRL_RIGHT || pad.lx >= 192) { input |= 1 << GUI_INPUT_RIGHT; } + return input; }