diff --git a/src/pc/gfx/gfx_dxgi.cpp b/src/pc/gfx/gfx_dxgi.cpp index 516360d71..3e764a0bb 100644 --- a/src/pc/gfx/gfx_dxgi.cpp +++ b/src/pc/gfx/gfx_dxgi.cpp @@ -161,8 +161,6 @@ static void toggle_borderless_window_full_screen(bool enable) { ShowWindow(dxgi.h_wnd, SW_RESTORE); } - ShowCursor(TRUE); - dxgi.is_full_screen = false; } else { // Save if window is maximized or not @@ -191,8 +189,6 @@ static void toggle_borderless_window_full_screen(bool enable) { SetWindowLongPtr(dxgi.h_wnd, GWL_STYLE, WS_VISIBLE | WS_POPUP); SetWindowPos(dxgi.h_wnd, HWND_TOP, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_FRAMECHANGED); - ShowCursor(FALSE); - dxgi.is_full_screen = true; } } @@ -357,6 +353,7 @@ static void gfx_dxgi_init(const char *window_title) { ShowWindow(dxgi.h_wnd, SW_SHOW); UpdateWindow(dxgi.h_wnd); + ShowCursor(FALSE); update_screen_settings(); } diff --git a/src/pc/gfx/gfx_sdl2.c b/src/pc/gfx/gfx_sdl2.c index e9563beed..8e1325f5c 100644 --- a/src/pc/gfx/gfx_sdl2.c +++ b/src/pc/gfx/gfx_sdl2.c @@ -169,10 +169,8 @@ static void gfx_sdl_set_fullscreen(void) { return; if (configWindow.fullscreen) { SDL_SetWindowFullscreen(wnd, SDL_WINDOW_FULLSCREEN_DESKTOP); - SDL_ShowCursor(SDL_DISABLE); } else { SDL_SetWindowFullscreen(wnd, 0); - SDL_ShowCursor(SDL_ENABLE); configWindow.exiting_fullscreen = true; } } @@ -228,6 +226,7 @@ static void gfx_sdl_init(const char *window_title) { gfx_sdl_set_vsync(configWindow.vsync); gfx_sdl_set_fullscreen(); + SDL_ShowCursor(SDL_DISABLE); for (size_t i = 0; i < sizeof(windows_scancode_table) / sizeof(SDL_Scancode); i++) { inverted_scancode_table[windows_scancode_table[i]] = i;