mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-26 16:18:57 +00:00
Removed SDL_GetDisplayDPI()
This function wasn't consistently correct across platforms and devices. If you want the UI scale factor, you can use display_scale in the structure returned by SDL_GetDesktopDisplayMode(). If you need an approximate DPI, you can multiply this value times 160 on iPhone and Android, and 96 on other platforms.
This commit is contained in:
@@ -1051,7 +1051,6 @@ SDL_GL_GetDrawableSize() has been removed. SDL_GetWindowSizeInPixels() can be us
|
||||
|
||||
The following functions have been renamed:
|
||||
* SDL_GetClosestDisplayMode() => SDL_GetClosestFullscreenDisplayMode()
|
||||
* SDL_GetDisplayDPI() => SDL_GetDisplayPhysicalDPI()
|
||||
* SDL_GetPointDisplayIndex() => SDL_GetDisplayForPoint()
|
||||
* SDL_GetRectDisplayIndex() => SDL_GetDisplayForRect()
|
||||
* SDL_GetWindowDisplayIndex() => SDL_GetDisplayForWindow()
|
||||
@@ -1060,6 +1059,7 @@ The following functions have been renamed:
|
||||
|
||||
The following functions have been removed:
|
||||
* SDL_GetClosestFullscreenDisplayMode()
|
||||
* SDL_GetDisplayDPI() - not reliable across platforms, approximately replaced by multiplying `display_scale` in the structure returned by SDL_GetDesktopDisplayMode() times 160 on iPhone and Android, and 96 on other platforms.
|
||||
* SDL_GetDisplayMode()
|
||||
* SDL_GetNumDisplayModes() - replaced with SDL_GetFullscreenDisplayModes()
|
||||
* SDL_GetNumVideoDisplays() - replaced with SDL_GetDisplays()
|
||||
|
||||
Reference in New Issue
Block a user