SDL_HINT_MOUSE_DPI_SCALE_CURSORS(3)
π SDL_HINT_MOUSE_DPI_SCALE_CURSORS π
okay bestie, welcome to the SDL3 functions manual, this one's a macro-hint situation and it's literally so useful π«Ά
β¨ NAME β¨
SDL_HINT_MOUSE_DPI_SCALE_CURSORS β a variable that decides whether we scale cursors by the current display scale or not π
π SYNOPSIS π
#include <SDL3/SDL_hints.h>
#define SDL_HINT_MOUSE_DPI_SCALE_CURSORS "SDL_MOUSE_DPI_SCALE_CURSORS"
like yes, that's the whole thing, she's short and she's iconic πΈ
π¦ DESCRIPTION π¦
so this variable can be set to the following values, and there are exactly two, no cap:
"0"β cursors will not change size based on the display content scale. this is the default, she's the chill one, the low-maintenance queen π"1"β cursors will automatically match the display content scale (e.g. a2xsized cursor will be used when the window is on a monitor with200%scale). this is currently implemented on Windows π₯
β οΈ and listen, this hint needs to be set before creating cursors. before. like, do it first. the vibe check happens at creation time, so if you roll up late it's not gonna help you bestie π
π AVAILABILITY π
this hint is available since SDL 3.4.0 β so if you're on anything older, sorry babe, she doesn't exist yet π
and that's the whole page, mwah π go forth and make those cursors the right size on that 200% monitor, main character energy only π
Simple Directmedia Layer Β· SDL 3.4.18 β tysm for reading, ily, bye bestie πβ¨π
π¦ 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