SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 6a24b9206f1314da8d1b71be8908903853b28909 parent 30a8c4bf4205bc87da6844539982d9e7cd0a8875 Author: Lior Halphon <LIJI32@gmail.com> Date: Mon, 2 Jun 2025 21:21:23 +0300 Remove the navigation string since it doesn't fit Diffstat:
| M | SDL/gui.c | 17 | ++++++++++++----- |
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/SDL/gui.c b/SDL/gui.c @@ -87,7 +87,6 @@ void render_texture(void *pixels, void *previous) static const char *help[] = { "Keyboard Shortcuts:\n" " Open Menu: Escape\n" -" Menu Navigation: Arrow keys or hjkl\n" " Open ROM: " MODIFIER_NAME "+O\n" " Reset: " MODIFIER_NAME "+R\n" " Pause: " MODIFIER_NAME "+P\n" @@ -2708,12 +2707,16 @@ void run_gui(bool is_running) } } else if (gui_state == SHOWING_MENU) { - if ((event.key.keysym.scancode == SDL_SCANCODE_DOWN || event.key.keysym.scancode == SDL_SCANCODE_J) && current_menu[current_selection + 1].string) { + if ((event.key.keysym.scancode == SDL_SCANCODE_DOWN || + event.key.keysym.scancode == SDL_SCANCODE_J) && + current_menu[current_selection + 1].string) { current_selection++; mouse_scroling = false; should_render = true; } - else if ((event.key.keysym.scancode == SDL_SCANCODE_UP || event.key.keysym.scancode == SDL_SCANCODE_K) && current_selection) { + else if ((event.key.keysym.scancode == SDL_SCANCODE_UP || + event.key.keysym.scancode == SDL_SCANCODE_K) && + current_selection) { current_selection--; mouse_scroling = false; should_render = true; @@ -2737,11 +2740,15 @@ void run_gui(bool is_running) return; } } - else if ((event.key.keysym.scancode == SDL_SCANCODE_RIGHT || event.key.keysym.scancode == SDL_SCANCODE_L) && current_menu[current_selection].backwards_handler) { + else if ((event.key.keysym.scancode == SDL_SCANCODE_RIGHT || + event.key.keysym.scancode == SDL_SCANCODE_L) && + current_menu[current_selection].backwards_handler) { current_menu[current_selection].handler(current_selection); should_render = true; } - else if ((event.key.keysym.scancode == SDL_SCANCODE_LEFT || event.key.keysym.scancode == SDL_SCANCODE_H) && current_menu[current_selection].backwards_handler) { + else if ((event.key.keysym.scancode == SDL_SCANCODE_LEFT || + event.key.keysym.scancode == SDL_SCANCODE_H) && + current_menu[current_selection].backwards_handler) { current_menu[current_selection].backwards_handler(current_selection); should_render = true; }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.