Another Windows DPI try

This commit is contained in:
def 2017-07-15 15:31:53 +02:00
parent f627a72ebb
commit 78dc5aa959
2 changed files with 1 additions and 15 deletions

View file

@ -1,2 +1 @@
#include "winuser.h" 1 24 "DDNet.exe.manifest"
2 RT_MANIFEST "DDNet.exe.manifest"

View file

@ -597,19 +597,6 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
#ifdef __ANDROID__ #ifdef __ANDROID__
*pWidth = *pDesktopWidth; *pWidth = *pDesktopWidth;
*pHeight = *pDesktopHeight; *pHeight = *pDesktopHeight;
#elif defined(CONF_FAMILY_WINDOWS)
if(*pWidth == 0 || *pHeight == 0)
{
*pWidth = *pDesktopWidth;
*pHeight = *pDesktopHeight;
}
else
{
float dpi;
SDL_GetDisplayDPI(0, NULL, &dpi, NULL);
*pWidth = *pWidth * 96 / (int)dpi;
*pHeight = *pHeight * 96 / (int)dpi;
}
#else #else
if(*pWidth == 0 || *pHeight == 0) if(*pWidth == 0 || *pHeight == 0)
{ {