mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-25 15:48:58 +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:
@@ -162,7 +162,6 @@ SDL3_0.0.0 {
|
||||
SDL_GetDefaultCursor;
|
||||
SDL_GetDesktopDisplayMode;
|
||||
SDL_GetDisplayBounds;
|
||||
SDL_GetDisplayPhysicalDPI;
|
||||
SDL_GetDisplayForPoint;
|
||||
SDL_GetDisplayForRect;
|
||||
SDL_GetDisplayName;
|
||||
|
||||
@@ -187,7 +187,6 @@
|
||||
#define SDL_GetDefaultCursor SDL_GetDefaultCursor_REAL
|
||||
#define SDL_GetDesktopDisplayMode SDL_GetDesktopDisplayMode_REAL
|
||||
#define SDL_GetDisplayBounds SDL_GetDisplayBounds_REAL
|
||||
#define SDL_GetDisplayPhysicalDPI SDL_GetDisplayPhysicalDPI_REAL
|
||||
#define SDL_GetDisplayForPoint SDL_GetDisplayForPoint_REAL
|
||||
#define SDL_GetDisplayForRect SDL_GetDisplayForRect_REAL
|
||||
#define SDL_GetDisplayName SDL_GetDisplayName_REAL
|
||||
|
||||
@@ -261,7 +261,6 @@ SDL_DYNAPI_PROC(int,SDL_GetDefaultAudioInfo,(char **a, SDL_AudioSpec *b, int c),
|
||||
SDL_DYNAPI_PROC(SDL_Cursor*,SDL_GetDefaultCursor,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const SDL_DisplayMode*,SDL_GetDesktopDisplayMode,(SDL_DisplayID a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDisplayBounds,(SDL_DisplayID a, SDL_Rect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDisplayPhysicalDPI,(SDL_DisplayID a, float *b, float *c, float *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_DisplayID,SDL_GetDisplayForPoint,(const SDL_Point *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_DisplayID,SDL_GetDisplayForRect,(const SDL_Rect *a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetDisplayName,(SDL_DisplayID a),(a),return)
|
||||
|
||||
Reference in New Issue
Block a user