From 83ae953b21ac1ab7eaeaddb4e58351992a70afc5 Mon Sep 17 00:00:00 2001 From: Isaac Zhao Date: Tue, 17 Jul 2018 07:46:17 +0000 Subject: [PATCH] Fixed hidpi resolution issue on macOS --- src/engine/client/backend_sdl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 6ac46ddda..d8af9eb33 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -2390,7 +2390,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt return -1; } - SDL_GL_GetDrawableSize(m_pWindow, pWidth, pHeight); + SDL_GL_GetDrawableSize(m_pWindow, pCurrentWidth, pCurrentHeight); SDL_GL_SetSwapInterval(Flags&IGraphicsBackend::INITFLAG_VSYNC ? 1 : 0); SDL_GL_MakeCurrent(NULL, NULL); @@ -2430,8 +2430,6 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt WaitForIdle(); } - *pCurrentWidth = *pWidth; - *pCurrentHeight = *pHeight; SDL_ShowWindow(m_pWindow); if(SetWindowScreen(g_Config.m_GfxScreen))