1206: Fixed hidpi resolution issue on macOS r=def- a=weez15

fixed https://github.com/ddnet/ddnet/issues/1018

Co-authored-by: Isaac Zhao <isaac.zhao.17@gmail.com>
This commit is contained in:
bors[bot] 2018-07-17 07:53:11 +00:00
commit fe16e02fdf

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