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"
2 RT_MANIFEST "DDNet.exe.manifest"
1 24 "DDNet.exe.manifest"

View file

@ -597,19 +597,6 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
#ifdef __ANDROID__
*pWidth = *pDesktopWidth;
*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
if(*pWidth == 0 || *pHeight == 0)
{