mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-18 01:18:22 +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:
@@ -44,7 +44,6 @@
|
||||
/* Initialization/Query functions */
|
||||
static int Android_VideoInit(_THIS);
|
||||
static void Android_VideoQuit(_THIS);
|
||||
int Android_GetDisplayPhysicalDPI(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi);
|
||||
|
||||
#include "../SDL_egl_c.h"
|
||||
#define Android_GLES_GetProcAddress SDL_EGL_GetProcAddressInternal
|
||||
@@ -110,8 +109,6 @@ static SDL_VideoDevice *Android_CreateDevice(void)
|
||||
device->PumpEvents = Android_PumpEvents_NonBlocking;
|
||||
}
|
||||
|
||||
device->GetDisplayPhysicalDPI = Android_GetDisplayPhysicalDPI;
|
||||
|
||||
device->CreateSDLWindow = Android_CreateWindow;
|
||||
device->SetWindowTitle = Android_SetWindowTitle;
|
||||
device->SetWindowFullscreen = Android_SetWindowFullscreen;
|
||||
@@ -207,11 +204,6 @@ void Android_VideoQuit(_THIS)
|
||||
Android_QuitTouch();
|
||||
}
|
||||
|
||||
int Android_GetDisplayPhysicalDPI(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi)
|
||||
{
|
||||
return Android_JNI_GetDisplayPhysicalDPI(ddpi, hdpi, vdpi);
|
||||
}
|
||||
|
||||
void Android_SetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, float density, float rate)
|
||||
{
|
||||
Android_SurfaceWidth = surfaceWidth;
|
||||
|
||||
Reference in New Issue
Block a user