mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[client] don't update mouse scaling values until started
This commit is contained in:
parent
fe337cf510
commit
ae4156d041
@ -138,8 +138,11 @@ inline void updatePositionInfo()
|
|||||||
state.dstRect.h = h;
|
state.dstRect.h = h;
|
||||||
}
|
}
|
||||||
|
|
||||||
state.scaleX = (float)state.srcSize.y / (float)state.dstRect.h;
|
if (state.started)
|
||||||
state.scaleY = (float)state.srcSize.x / (float)state.dstRect.w;
|
{
|
||||||
|
state.scaleX = (float)state.srcSize.y / (float)state.dstRect.h;
|
||||||
|
state.scaleY = (float)state.srcSize.x / (float)state.dstRect.w;
|
||||||
|
}
|
||||||
|
|
||||||
if (state.lgr)
|
if (state.lgr)
|
||||||
state.lgr->on_resize(state.lgrData, w, h, state.dstRect);
|
state.lgr->on_resize(state.lgrData, w, h, state.dstRect);
|
||||||
@ -256,6 +259,8 @@ int renderThread(void * unused)
|
|||||||
state.srcSize.y = header.frame.height;
|
state.srcSize.y = header.frame.height;
|
||||||
if (params.autoResize)
|
if (params.autoResize)
|
||||||
SDL_SetWindowSize(state.window, header.frame.width, header.frame.height);
|
SDL_SetWindowSize(state.window, header.frame.width, header.frame.height);
|
||||||
|
|
||||||
|
state.started = true;
|
||||||
updatePositionInfo();
|
updatePositionInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user