mirror of
https://github.com/encounter/SDL.git
synced 2025-12-16 08:27:05 +00:00
Add SDL_GetDisplayDPI implementation on Android. (thanks Rachel!)
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
/* Initialization/Query functions */
|
||||
static int Android_VideoInit(_THIS);
|
||||
static void Android_VideoQuit(_THIS);
|
||||
int Android_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi);
|
||||
|
||||
#include "../SDL_egl_c.h"
|
||||
#define Android_GLES_GetProcAddress SDL_EGL_GetProcAddress
|
||||
@@ -115,6 +116,8 @@ Android_CreateDevice(int devindex)
|
||||
device->VideoQuit = Android_VideoQuit;
|
||||
device->PumpEvents = Android_PumpEvents;
|
||||
|
||||
device->GetDisplayDPI = Android_GetDisplayDPI;
|
||||
|
||||
device->CreateSDLWindow = Android_CreateWindow;
|
||||
device->SetWindowTitle = Android_SetWindowTitle;
|
||||
device->DestroyWindow = Android_DestroyWindow;
|
||||
@@ -198,6 +201,12 @@ Android_VideoQuit(_THIS)
|
||||
Android_QuitTouch();
|
||||
}
|
||||
|
||||
int
|
||||
Android_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdpi, float * vdpi)
|
||||
{
|
||||
return Android_JNI_GetDisplayDPI(ddpi, hdpi, vdpi);
|
||||
}
|
||||
|
||||
void
|
||||
Android_SetScreenResolution(int width, int height, Uint32 format, float rate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user