mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
Hide cursor regardless of window mode
This commit is contained in:
parent
28ce5e9cdf
commit
bf54a305d4
2 changed files with 2 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue