diff --git a/src/pc/gfx/gfx_sdl2.c b/src/pc/gfx/gfx_sdl2.c index 646dd287..a4960a88 100644 --- a/src/pc/gfx/gfx_sdl2.c +++ b/src/pc/gfx/gfx_sdl2.c @@ -176,15 +176,16 @@ static void gfx_sdl_get_dimensions(uint32_t *width, uint32_t *height) { } static void gfx_sdl_onkeydown(int scancode) { - if (kb_key_down) - kb_key_down(translate_sdl_scancode(scancode)); - const Uint8 *state = SDL_GetKeyboardState(NULL); if (state[SDL_SCANCODE_LALT] && state[SDL_SCANCODE_RETURN]) { configWindow.fullscreen = !configWindow.fullscreen; configWindow.settings_changed = true; + return; } + + if (kb_key_down) + kb_key_down(translate_sdl_scancode(scancode)); } static void gfx_sdl_onkeyup(int scancode) {