mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +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:
parent
b7c6fec10a
commit
824b9b0a58
28 changed files with 32 additions and 542 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue