map for dpad keys to emulator

This commit is contained in:
georgemoralis 2023-10-13 20:41:03 +03:00
parent e1b64617a8
commit 5a905b0c4f
1 changed files with 6 additions and 0 deletions

View File

@ -210,6 +210,12 @@ void keyboardEvent(SDL_Event* event) {
case SDLK_DOWN: button = ScePadButton::SCE_PAD_BUTTON_DOWN; break;
case SDLK_LEFT: button = ScePadButton::SCE_PAD_BUTTON_LEFT; break;
case SDLK_RIGHT: button = ScePadButton::SCE_PAD_BUTTON_RIGHT; break;
case SDLK_KP_8: button = ScePadButton ::SCE_PAD_BUTTON_TRIANGLE; break;
case SDLK_KP_6: button = ScePadButton ::SCE_PAD_BUTTON_CIRCLE; break;
case SDLK_KP_2: button = ScePadButton ::SCE_PAD_BUTTON_CROSS; break;
case SDLK_KP_4: button = ScePadButton ::SCE_PAD_BUTTON_SQUARE; break;
case SDLK_RETURN: button = ScePadButton ::SCE_PAD_BUTTON_OPTIONS; break;
default: break;
}
if (button != 0) {