SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4(3)
π SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4(3) β¨
okay bestie, sit down, we're doing a lil thing from the SDL3 FUNCTIONS manual, and it's genuinely so simple you're gonna slay it π
πΈ NAME πΈ
SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 β a variable that controls whether SDL generates window-close events for Alt+F4 on Windows. yes. that's it. that's the whole vibe. πͺβ¨
π SYNOPSIS π
#include <SDL3/SDL_hints.h>
#define SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 "SDL_WINDOWS_CLOSE_ON_ALT_F4"
like, just include the header and the macro is right there, no cap π
π¦ DESCRIPTION π¦
so the variable can be set to the following values, and there are literally two of them, we love a low-effort icon:
"0"β SDL will only do normal key handling for Alt+F4. that's it. no window closing, no drama, just keys being keys π"1"β SDL will generate a window-close event when it sees Alt+F4. (default) β yes bestie, this is the one you get if you say nothing, main character energy fr fr π
This hint can be set anytime. like, whenever. mid-frame, before init, doesn't matter, it's giving flexible β¨
π AVAILABILITY π
This hint is available since SDL 3.2.0. so if you're on something older... girl. update. π
β little reminder: it's a hint, so set it withSDL_SetHintand let SDL do its thing. don't come for me if you forget the quotes on the"0"/"1", iykyk π
and that's the whole page, you ate that π«Ά go forth and Alt+F4 responsibly πβ¨
β with love from the Simple Directmedia Layer girlies, SDL 3.4.18 edition ππ¦π
π¦ 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