table of contents
- trixie 3.2.10+ds-1
 - testing 3.2.26+ds-1
 - unstable 3.2.26+ds-2
 - experimental 3.3.2+git20251103~dc5b136+ds-1
 
| SDL_GetWindowDisplayScale(3) | SDL3 FUNCTIONS | SDL_GetWindowDisplayScale(3) | 
NAME¶
SDL_GetWindowDisplayScale - Get the content display scale relative to a window's pixel size.
SYNOPSIS¶
#include <SDL3/SDL_video.h>
float SDL_GetWindowDisplayScale(SDL_Window *window);
DESCRIPTION¶
This is a combination of the window pixel density and the display content scale, and is the expected scale for displaying content in this window. For example, if a 3840x2160 window had a display scale of 2.0, the user expects the content to take twice as many pixels and be the same physical size as if it were being displayed in a 1920x1080 window with a display scale of 1.0.
Conceptually this value corresponds to the scale display setting, and is updated when that setting is changed, or the window moves to a display with a different scale setting.
FUNCTION PARAMETERS¶
- window
 - the window to query.
 
RETURN VALUE¶
for more information.
THREAD SAFETY¶
This function should only be called on the main thread.
AVAILABILITY¶
This function is available since SDL 3.2.0.
| SDL 3.2.26 | Simple Directmedia Layer |