SDL_HINT_VID...SIZE_DRAWABLE(3)
π NAME π
SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE β bestie, it's a variable that says whether the metal layer drawable size should get updated for the SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event on macOS. That's the whole vibe. β¨
π SYNOPSIS π
okay so first you gotta bring it in:
#include <SDL3/SDL_hints.h>
#define SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE "SDL_VIDEO_METAL_AUTO_RESIZE_DRAWABLE"
literally just a #define, nothing scary, she's lowkey iconic for that. π¦
πΈ DESCRIPTION πΈ
so this variable can be set to these values, and the way that you pick one matters:
"0"β the metal layer drawable size will not be updated on theSDL_EVENT_WINDOW_PIXEL_SIZE_CHANGEDevent. she's giving "I'll handle it myself, thanks." π"1"β the metal layer drawable size will be updated on theSDL_EVENT_WINDOW_PIXEL_SIZE_CHANGEDevent. this one is the default, so if you do nothing at all, you already get this. main character energy fr fr. π
π«Ά heads up bestie: this hint should be set before SDL_Metal_CreateView called. not after, not during, before. the order is not optional, I don't make the rules, SDL does. π
β AVAILABILITY β
this hint is available since SDL 3.4.0. if your SDL is older than that, she simply does not exist yet, no cap. π
and that's the whole page, babe β straight out of the Simple Directmedia Layer docs, SDL 3.4.18 era, so go forth and resize those drawables responsibly. mwah, ily, bye. πβ¨ππ¦πΈ
π¦ 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