mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] added debug output for failure of spice message transmission
This commit is contained in:
parent
ce42f9567e
commit
d61b26959c
@ -478,37 +478,70 @@ int eventThread(void * arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case SDL_MOUSEWHEEL:
|
case SDL_MOUSEWHEEL:
|
||||||
spice_mouse_press (event.wheel.y == 1 ? 4 : 5);
|
if (
|
||||||
spice_mouse_release(event.wheel.y == 1 ? 4 : 5);
|
!spice_mouse_press (event.wheel.y == 1 ? 4 : 5) ||
|
||||||
|
!spice_mouse_release(event.wheel.y == 1 ? 4 : 5)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DEBUG_ERROR("SDL_MOUSEWHEEL: failed to send messages");
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_MOUSEMOTION:
|
case SDL_MOUSEMOTION:
|
||||||
|
{
|
||||||
|
bool ok;
|
||||||
if (serverMode)
|
if (serverMode)
|
||||||
spice_mouse_motion(event.motion.xrel, event.motion.yrel);
|
ok = spice_mouse_motion(event.motion.xrel, event.motion.yrel);
|
||||||
else
|
else
|
||||||
spice_mouse_motion(
|
ok = spice_mouse_motion(
|
||||||
(int)event.motion.x - mouseX,
|
(int)event.motion.x - mouseX,
|
||||||
(int)event.motion.y - mouseY
|
(int)event.motion.y - mouseY
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!ok)
|
||||||
|
{
|
||||||
|
DEBUG_ERROR("SDL_MOUSEMOTION: failed to send message");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
mouseX = event.motion.x;
|
mouseX = event.motion.x;
|
||||||
mouseY = event.motion.y;
|
mouseY = event.motion.y;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
#ifdef DEBUG_INPUT_STATE
|
#ifdef DEBUG_INPUT_STATE
|
||||||
state.mouse[event.button.button] = true;
|
state.mouse[event.button.button] = true;
|
||||||
#endif
|
#endif
|
||||||
spice_mouse_position(event.button.x, event.button.y);
|
if (
|
||||||
spice_mouse_press(event.button.button);
|
!spice_mouse_position(event.button.x, event.button.y) ||
|
||||||
|
!spice_mouse_press(event.button.button)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DEBUG_ERROR("SDL_MOUSEBUTTONDOWN: failed to send message");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
mouseX = event.motion.x;
|
||||||
|
mouseY = event.motion.y;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
#ifdef DEBUG_INPUT_STATE
|
#ifdef DEBUG_INPUT_STATE
|
||||||
state.mouse[event.button.button] = false;
|
state.mouse[event.button.button] = false;
|
||||||
#endif
|
#endif
|
||||||
spice_mouse_position(event.button.x, event.button.y);
|
if (
|
||||||
spice_mouse_release(event.button.button);
|
!spice_mouse_position(event.button.x, event.button.y) ||
|
||||||
|
!spice_mouse_release(event.button.button)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DEBUG_ERROR("SDL_MOUSEBUTTONUP: failed to send message");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
mouseX = event.motion.x;
|
||||||
|
mouseY = event.motion.y;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user