mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-03-06 00:30:49 +00:00
[client] don't update mouse scaling values until started
This commit is contained in:
parent
fe337cf510
commit
ae4156d041
1 changed files with 7 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue