Store the initial window size in the state

Fixes #107
This commit is contained in:
Alexander Olofsson 2018-12-16 10:01:19 +01:00 committed by Geoffrey McRae
parent 507732587e
commit 1d3a23e051

View File

@ -862,6 +862,9 @@ int run()
if (!params.center)
SDL_SetWindowPosition(state.window, params.x, params.y);
// ensure the initial window size is stored in the state
SDL_GetWindowSize(state.window, &state.windowW, &state.windowH);
// set the compositor hint to bypass for low latency
SDL_SysWMinfo wminfo;
SDL_VERSION(&wminfo.version);