SDL_SetWindowFullscreenMode(3)
π SDL_SetWindowFullscreenMode π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual β this is SDL_SetWindowFullscreenMode(3) and she is here to pick which display mode your window rocks when it goes fullscreen. no cap.
β¨ NAME β¨
SDL_SetWindowFullscreenMode β set the display mode to use when a window is visible and fullscreen.
it's giving "glow up your fullscreen vibe" fr fr π¦
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_video.h>
bool SDL_SetWindowFullscreenMode(SDL_Window *window, const SDL_DisplayMode *mode);
π DESCRIPTION π
so, the tea: this only affects the display mode used when the window is fullscreen. that's it, that's the lane she stays in. if you wanna change the window size when the window is not fullscreen, that's a whole different girl β use SDL_SetWindowSize() instead. π
if the window is currently in the fullscreen state, this request is asynchronous on some windowing systems π which means the new mode dimensions may not be applied immediately upon the return of this function. like, she said yes but she's still getting ready. if an immediate change is required, call SDL_SyncWindow() to block until the changes have taken effect β that's your "bestie are you ready yet" function, periodt. π
when the new mode takes effect, an SDL_EVENT_WINDOW_RESIZED and/or an SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event will be emitted with the new mode dimensions. so you will get notified, don't stress. β¨
π«Ά FUNCTION PARAMETERS π«Ά
windowβ the window to affect. your main character, the one getting the glow up πmodeβ a pointer to the display mode to use, which can beNULLfor borderless fullscreen desktop mode, or one of the fullscreen modes returned bySDL_GetFullscreenDisplayModes()to set an exclusive fullscreen mode. so like,NULL= chill borderless vibe π, or hand her a real mode fromSDL_GetFullscreenDisplayModes()for the exclusive fullscreen moment π
β RETURN VALUE β
returns true on success or false on failure π and if it's a flop, call SDL_GetError() for more information. she'll tell you what went wrong, i promise. π
π§ THREAD SAFETY π§
this function should only be called on the main thread. no side-quest threads, bestie. main thread only, iykyk. π
π AVAILABILITY π
this function is available since SDL 3.2.0. so if you're on something older, that's a no from her. π
π SEE ALSO π
and that's the whole page, bestie!! π₯³ brought to you by the Simple Directmedia Layer girlies, SDL 3.4.18, dated SDL_SetWindowFullscreenMode(3) πβ¨ go forth and fullscreen slay π¦ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms