SDL_SetWindowResizable(3)
β¨ SDL_SetWindowResizable β¨
okay bestie so this is a page from the SDL3 FUNCTIONS manual β it's SDL_SetWindowResizable(3) and it's literally about letting people drag your window bigger or smaller π
πΈ NAME πΈ
SDL_SetWindowResizable β set the user-resizable state of a window. that's it, that's the whole vibe π¦
π SYNOPSIS π
#include <SDL3/SDL_video.h>
bool SDL_SetWindowResizable(SDL_Window *window, bool resizable);
π DESCRIPTION π
so what this does is it adds or removes the window's SDL_WINDOW_RESIZABLE flag and allows/disallows user resizing of the window. like, you flip the switch, the flag flips with you. iconic. β¨
ngl if the window's resizable state already matches the state you're asking for, this is a no-op. nothing happens. zero drama. it's giving "we already knew" π
and okay important one: you can't change the resizable state of a fullscreen window. fullscreen windows said "no thank you" and honestly? valid. π«
π«Ά FUNCTION PARAMETERS π«Ά
windowβ the window of which to change the resizable state. yep, that one. the window right there πresizableβtrueto allow resizing,falseto disallow. pick your fighter π₯
β RETURN VALUE β
returns true on success or false on failure π₯² and if it fails, call SDL_GetError() for more information β she will tell you what went wrong, fr fr.
π§΅ THREAD SAFETY π§΅
π¨ this function should only be called on the main thread. main character energy only, no side quests, no background threads. periodt. π
π AVAILABILITY π
this function is available since SDL 3.2.0. so if you're on anything olderβ¦ bestie. upgrade. π
π SEE ALSO π
mwah π that's the page! this lil beauty comes to you courtesy of Simple Directmedia Layer, sitting pretty at version SDL 3.4.18 β go resize something responsibly, and remember: no-op means no-op ππ¦π
π¦ 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