Hide mouse cursor in fullscreen; close #23

This commit is contained in:
Dominic Szablewski 2023-08-15 19:44:58 +02:00
parent 5314d92ec6
commit 6c85526fcd
2 changed files with 4 additions and 1 deletions

View file

@ -193,9 +193,11 @@ void platform_set_fullscreen(bool fullscreen) {
SDL_GetDesktopDisplayMode(display, &mode);
SDL_SetWindowDisplayMode(window, &mode);
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN);
SDL_ShowCursor(SDL_DISABLE);
}
else {
SDL_SetWindowFullscreen(window, 0);
SDL_SetWindowFullscreen(window, 0);
SDL_ShowCursor(SDL_ENABLE);
}
}

View file

@ -161,6 +161,7 @@ void platform_set_fullscreen(bool fullscreen) {
}
sapp_toggle_fullscreen();
sapp_show_mouse(!fullscreen);
}
void platform_handle_event(const sapp_event* ev) {