mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 21:45: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);
|
ShowWindow(dxgi.h_wnd, SW_RESTORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowCursor(TRUE);
|
|
||||||
|
|
||||||
dxgi.is_full_screen = false;
|
dxgi.is_full_screen = false;
|
||||||
} else {
|
} else {
|
||||||
// Save if window is maximized or not
|
// 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);
|
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);
|
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;
|
dxgi.is_full_screen = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -357,6 +353,7 @@ static void gfx_dxgi_init(const char *window_title) {
|
||||||
|
|
||||||
ShowWindow(dxgi.h_wnd, SW_SHOW);
|
ShowWindow(dxgi.h_wnd, SW_SHOW);
|
||||||
UpdateWindow(dxgi.h_wnd);
|
UpdateWindow(dxgi.h_wnd);
|
||||||
|
ShowCursor(FALSE);
|
||||||
|
|
||||||
update_screen_settings();
|
update_screen_settings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,10 +169,8 @@ static void gfx_sdl_set_fullscreen(void) {
|
||||||
return;
|
return;
|
||||||
if (configWindow.fullscreen) {
|
if (configWindow.fullscreen) {
|
||||||
SDL_SetWindowFullscreen(wnd, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
SDL_SetWindowFullscreen(wnd, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||||
SDL_ShowCursor(SDL_DISABLE);
|
|
||||||
} else {
|
} else {
|
||||||
SDL_SetWindowFullscreen(wnd, 0);
|
SDL_SetWindowFullscreen(wnd, 0);
|
||||||
SDL_ShowCursor(SDL_ENABLE);
|
|
||||||
configWindow.exiting_fullscreen = true;
|
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_vsync(configWindow.vsync);
|
||||||
|
|
||||||
gfx_sdl_set_fullscreen();
|
gfx_sdl_set_fullscreen();
|
||||||
|
SDL_ShowCursor(SDL_DISABLE);
|
||||||
|
|
||||||
for (size_t i = 0; i < sizeof(windows_scancode_table) / sizeof(SDL_Scancode); i++) {
|
for (size_t i = 0; i < sizeof(windows_scancode_table) / sizeof(SDL_Scancode); i++) {
|
||||||
inverted_scancode_table[windows_scancode_table[i]] = i;
|
inverted_scancode_table[windows_scancode_table[i]] = i;
|
||||||
|
|
Loading…
Reference in a new issue