mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +00:00
[client] realign mouse when switching between capture modes
This commit is contained in:
parent
be792f33ce
commit
828cc1d4b7
@ -425,6 +425,13 @@ int eventThread(void * arg)
|
||||
spice_mouse_mode(serverMode);
|
||||
SDL_SetRelativeMouseMode(serverMode);
|
||||
|
||||
if (!serverMode)
|
||||
{
|
||||
mouseX = state.shm->mouseX;
|
||||
mouseY = state.shm->mouseY;
|
||||
SDL_WarpMouseInWindow(state.window, mouseX, mouseY);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_INPUT_STATE
|
||||
DEBUG_INFO("mouse state:");
|
||||
for (unsigned int i = 0; i < sizeof(state.mouse) / sizeof(bool); ++i)
|
||||
|
Loading…
Reference in New Issue
Block a user