Fixed hidpi resolution issue on macOS

This commit is contained in:
Isaac Zhao 2018-07-17 07:46:17 +00:00 committed by GitHub
parent 498f2fe7ac
commit 83ae953b21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))