fixed menu input issues
This commit is contained in:
parent
551260d6eb
commit
ba29da405f
2 changed files with 6 additions and 4 deletions
|
@ -464,9 +464,11 @@ void gamepad_button(SDL_GameControllerButton button, int state) {
|
|||
|
||||
case SDL_CONTROLLER_BUTTON_A:
|
||||
events_emit(TE_MENU_ACCEPT, 0, NULL, NULL);
|
||||
break;
|
||||
|
||||
case SDL_CONTROLLER_BUTTON_B:
|
||||
events_emit(TE_MENU_ABORT, 0, NULL, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
if(key >= 0) {
|
||||
|
|
|
@ -74,10 +74,10 @@ void draw_saverpy_menu(MenuData *m) {
|
|||
}
|
||||
|
||||
bool savepry_input_handler(SDL_Event *event, void *arg) {
|
||||
if(event->type == MAKE_TAISEI_EVENT(TE_MENU_CURSOR_UP)) {
|
||||
event->type = MAKE_TAISEI_EVENT(TE_MENU_CURSOR_LEFT);
|
||||
} else if(event->type == MAKE_TAISEI_EVENT(TE_MENU_CURSOR_UP)) {
|
||||
event->type = MAKE_TAISEI_EVENT(TE_MENU_CURSOR_RIGHT);
|
||||
if(event->type == MAKE_TAISEI_EVENT(TE_MENU_CURSOR_LEFT)) {
|
||||
event->type = MAKE_TAISEI_EVENT(TE_MENU_CURSOR_UP);
|
||||
} else if(event->type == MAKE_TAISEI_EVENT(TE_MENU_CURSOR_RIGHT)) {
|
||||
event->type = MAKE_TAISEI_EVENT(TE_MENU_CURSOR_DOWN);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue