mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-11 06:43:56 +00:00
[client] don't scale the mouse when in capture mode
This commit is contained in:
parent
6918eeca26
commit
9e02131525
1 changed files with 3 additions and 2 deletions
|
@ -475,7 +475,7 @@ int eventFilter(void * userdata, SDL_Event * event)
|
||||||
{
|
{
|
||||||
x = event->motion.x - state.dstRect.x;
|
x = event->motion.x - state.dstRect.x;
|
||||||
y = event->motion.y - state.dstRect.y;
|
y = event->motion.y - state.dstRect.y;
|
||||||
if (params.scaleMouseInput)
|
if (params.scaleMouseInput && !serverMode)
|
||||||
{
|
{
|
||||||
x = (float)x * state.scaleX;
|
x = (float)x * state.scaleX;
|
||||||
y = (float)y * state.scaleY;
|
y = (float)y * state.scaleY;
|
||||||
|
@ -495,7 +495,7 @@ int eventFilter(void * userdata, SDL_Event * event)
|
||||||
y = event->motion.yrel;
|
y = event->motion.yrel;
|
||||||
if (x != 0 || y != 0)
|
if (x != 0 || y != 0)
|
||||||
{
|
{
|
||||||
if (params.scaleMouseInput)
|
if (params.scaleMouseInput && !serverMode)
|
||||||
{
|
{
|
||||||
state.accX += (float)x * state.scaleX;
|
state.accX += (float)x * state.scaleX;
|
||||||
state.accY += (float)y * state.scaleY;
|
state.accY += (float)y * state.scaleY;
|
||||||
|
@ -504,6 +504,7 @@ int eventFilter(void * userdata, SDL_Event * event)
|
||||||
state.accX -= x;
|
state.accX -= x;
|
||||||
state.accY -= y;
|
state.accY -= y;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!spice_mouse_motion(x, y))
|
if (!spice_mouse_motion(x, y))
|
||||||
{
|
{
|
||||||
DEBUG_ERROR("SDL_MOUSEMOTION: failed to send message");
|
DEBUG_ERROR("SDL_MOUSEMOTION: failed to send message");
|
||||||
|
|
Loading…
Reference in a new issue