diff --git a/docs/00_getting_started_sd.md b/docs/00_getting_started_sd.md index 4ee6e763..af937dfe 100644 --- a/docs/00_getting_started_sd.md +++ b/docs/00_getting_started_sd.md @@ -36,7 +36,7 @@ SD:\ │ │ ├── NDDJ2.n64 │ │ └── NDXJ0.n64 │ │ -│ └── emulators +│ └── emulators\ │ ├── neon64bu.rom │ ├── sodium64.z64 │ ├── gb.v64 diff --git a/src/menu/actions.c b/src/menu/actions.c index 14c87fb6..9c44c23e 100644 --- a/src/menu/actions.c +++ b/src/menu/actions.c @@ -25,8 +25,17 @@ static void actions_clear (menu_t *menu) { } static void actions_update_direction (menu_t *menu) { - joypad_8way_t held_dir = joypad_get_direction(JOYPAD_PORT_1, JOYPAD_2D_DPAD | JOYPAD_2D_STICK); - joypad_8way_t fast_dir = joypad_get_direction(JOYPAD_PORT_1, JOYPAD_2D_C); + joypad_8way_t held_dir; + joypad_8way_t fast_dir; + + JOYPAD_PORT_FOREACH (i) { + held_dir = joypad_get_direction(i, JOYPAD_2D_DPAD | JOYPAD_2D_STICK); + fast_dir = joypad_get_direction(i, JOYPAD_2D_C); + if (held_dir != JOYPAD_8WAY_NONE || fast_dir != JOYPAD_8WAY_NONE) { + break; + } + } + if (fast_dir != JOYPAD_8WAY_NONE) { held_dir = fast_dir; @@ -82,7 +91,14 @@ static void actions_update_direction (menu_t *menu) { } static void actions_update_buttons (menu_t *menu) { - joypad_buttons_t pressed = joypad_get_buttons_pressed(JOYPAD_PORT_1); + joypad_buttons_t pressed; + + JOYPAD_PORT_FOREACH (i) { + pressed = joypad_get_buttons_pressed(i); + if (pressed.raw) { + break; + } + } if (pressed.a) { menu->actions.enter = true;