sdlGetDisplayContentScale function
Get the content scale of a display.
The content scale is the expected scale for content based on the DPI settings of the display. For example, a 4K display might have a 2.0 (200%) display scale, which means that the user expects UI elements to be twice as big on this display, to aid in readability.
\param displayID the instance ID of the display to query. \returns the content scale of the display, or 0.0f on failure; call SDL_GetError() for more information.
\threadsafety This function should only be called on the main thread.
\since This function is available since SDL 3.1.3.
\sa SDL_GetDisplays
extern SDL_DECLSPEC float SDLCALL SDL_GetDisplayContentScale(SDL_DisplayID displayID)
Implementation
double sdlGetDisplayContentScale(int displayId) {
final sdlGetDisplayContentScaleLookupFunction = libSdl3.lookupFunction<
Float Function(Uint32 displayId),
double Function(int displayId)>('SDL_GetDisplayContentScale');
return sdlGetDisplayContentScaleLookupFunction(displayId);
}