SDL_HINT_REN..._POWER_DEVICE(3)
π SDL_HINT_REN..._POWER_DEVICE(3) π
ok bestie, welcome to the SDL3 FUNCTIONS section of the manual, and bestie we are talking about a hint. a Metal hint. a power hint. buckle up π¦
β¨ NAME β¨
SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE β it's a variable that controls whether the Metal render driver picks the low power device over the default one. like, does it choose the chill battery-friendly GPU or the regular one. that's the whole vibe check. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hints.h>
#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
so you pull in the header, and the macro literally just expands to that string. that's it. that's the girl. β¨
π DESCRIPTION π
okay so the variable can be set to these values, no cap:
- "0" β Use the preferred OS device. this one is the default, it's the main character, it's the one you get if you say nothing at all π«Ά
- "1" β Select a low power device. choosing this is giving battery-saver era, lowkey β¨
β οΈ real talk though β this hint should be set before creating a renderer. not after. before. set it late and it just won't do the thing, and that's on periodt π
π AVAILABILITY π
this hint is available since SDL 3.2.0. so if you're on anything older, it's giving nothing, i'm so sorry π
and that's the whole page, bestie!! you ate. go set your hint before you make your renderer and live your best low-power life π₯π
this lil manual page came to you from Simple Directmedia Layer, documenting SDL 3.4.18 β mwah, take care of her πππ¦
π¦ 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