[client] don't update mouse scaling values until started

This commit is contained in:
Geoffrey McRae 2017-12-15 18:47:44 +11:00
parent fe337cf510
commit ae4156d041

View File

@ -138,8 +138,11 @@ inline void updatePositionInfo()
state.dstRect.h = h;
}
if (state.started)
{
state.scaleX = (float)state.srcSize.y / (float)state.dstRect.h;
state.scaleY = (float)state.srcSize.x / (float)state.dstRect.w;
}
if (state.lgr)
state.lgr->on_resize(state.lgrData, w, h, state.dstRect);
@ -256,6 +259,8 @@ int renderThread(void * unused)
state.srcSize.y = header.frame.height;
if (params.autoResize)
SDL_SetWindowSize(state.window, header.frame.width, header.frame.height);
state.started = true;
updatePositionInfo();
}