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