SDL Wiki
(This is the legacy documentation for stable SDL2, the current stable version; SDL3 is the current development version.)


Controls whether SDL will declare the process to be DPI aware.

Header File

Defined in SDL_hints.h




This hint must be set before initializing the video subsystem.

The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with a DPI scale factor.

This hint is equivalent to requesting DPI awareness via external means (e.g. calling SetProcessDpiAwarenessContext) and does not cause SDL to use a virtualized coordinate system, so it will generally give you 1 SDL coordinate = 1 pixel even on high-DPI displays.

For more information, see:

This variable can be set to the following values:

If the requested DPI awareness is not available on the currently running OS, SDL will try to request the best available match.

CategoryAPI, CategoryAPIMacro, CategoryHints

[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.