From 848f7c352b15c9e564eede771ac682bdef8bcef0 Mon Sep 17 00:00:00 2001 From: HengiFettlich Date: Fri, 8 May 2020 12:24:40 +0200 Subject: [PATCH] Update gfx_sdl2.c if fullscreened, escape to exit fullscreen --- src/pc/gfx/gfx_sdl2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pc/gfx/gfx_sdl2.c b/src/pc/gfx/gfx_sdl2.c index 1afe5ea..1df686b 100644 --- a/src/pc/gfx/gfx_sdl2.c +++ b/src/pc/gfx/gfx_sdl2.c @@ -167,6 +167,11 @@ static void gfx_sdl_onkeydown(int scancode) { configFullscreen = !configFullscreen; } + else if (state[SDL_SCANCODE_ESCAPE] && configFullscreen) + { + SDL_SetWindowFullscreen(wnd, 0); + configFullscreen = false; + } } static void gfx_sdl_onkeyup(int scancode) {