mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Another Windows DPI try
This commit is contained in:
parent
f627a72ebb
commit
78dc5aa959
|
@ -1,2 +1 @@
|
|||
#include "winuser.h"
|
||||
2 RT_MANIFEST "DDNet.exe.manifest"
|
||||
1 24 "DDNet.exe.manifest"
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue