From 1e8dfa66fd77cba270c3ff6a4cfa2ff8d64f1cc2 Mon Sep 17 00:00:00 2001 From: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com> Date: Mon, 24 Apr 2023 02:10:43 +1000 Subject: [PATCH] stop trapping cursor in window leaving fullscreen (#353) --- src/pc/gfx/gfx_sdl2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pc/gfx/gfx_sdl2.c b/src/pc/gfx/gfx_sdl2.c index 2552064b..62277b3f 100644 --- a/src/pc/gfx/gfx_sdl2.c +++ b/src/pc/gfx/gfx_sdl2.c @@ -72,13 +72,16 @@ static void gfx_sdl_set_fullscreen(void) { SDL_SetWindowFullscreen(wnd, SDL_WINDOW_FULLSCREEN_DESKTOP); } else { SDL_SetWindowFullscreen(wnd, 0); + SDL_ShowCursor(1); configWindow.exiting_fullscreen = true; } } static void gfx_sdl_reset_dimension_and_pos(void) { - if (configWindow.exiting_fullscreen) + if (configWindow.exiting_fullscreen) { configWindow.exiting_fullscreen = false; + SDL_ShowCursor(0); + } if (configWindow.reset) { configWindow.x = WAPI_WIN_CENTERPOS;