mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 15:19:58 -04:00
Leave F11 to overlays when Ctrl, Shift or Alt is held with it.
F11 switched fullscreen whatever modifier was held, so an overlay or capture tool's Ctrl+F11 or Shift+F11 shortcut also switched the game's window. The Win32 window now ignores F11 with Ctrl or Shift held (Alt+F11 already arrives as a system key it does not handle), and the SDL window with any modifier. docs/controls.md says so. Checked: the runtime compiles; gfx_window_sdl.c passes a syntax check against the SDL3 headers. Not run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -186,7 +186,9 @@ static void handle(const SDL_Event *e) {
|
||||
menu_sdl_event(e);
|
||||
switch (e->type) {
|
||||
case SDL_EVENT_KEY_DOWN:
|
||||
if (e->key.scancode == SDL_SCANCODE_F11 && !e->key.repeat) {
|
||||
// not with a modifier held: overlays and capture tools take Ctrl, Shift or Alt+F11 for their own
|
||||
if (e->key.scancode == SDL_SCANCODE_F11 && !e->key.repeat &&
|
||||
!(e->key.mod & (SDL_KMOD_CTRL | SDL_KMOD_SHIFT | SDL_KMOD_ALT | SDL_KMOD_GUI))) {
|
||||
set_fullscreen(!is_fullscreen());
|
||||
cfg_set("NX2NAVI_FULLSCREEN", is_fullscreen() ? "1" : "0"); // the menu shows it; the next start keeps it
|
||||
cfg_save();
|
||||
|
||||
Reference in New Issue
Block a user