Commit 2d968ffb authored by Cole Robinson's avatar Cole Robinson Committed by Gerd Hoffmann

input: sdl2: Fix relative mode to match SDL1 behavior

Right now relative mode accelerates too fast, and has the 'invisible wall'
problem. SDL2 added an explicit API to handle this use case, so let's use
it.
Signed-off-by: default avatarCole Robinson <crobinso@redhat.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent afbc0dd6
......@@ -278,7 +278,7 @@ static void sdl_hide_cursor(void)
SDL_ShowCursor(1);
SDL_SetCursor(sdl_cursor_hidden);
} else {
SDL_ShowCursor(0);
SDL_SetRelativeMouseMode(SDL_TRUE);
}
}
......@@ -289,6 +289,7 @@ static void sdl_show_cursor(void)
}
if (!qemu_input_is_absolute()) {
SDL_SetRelativeMouseMode(SDL_FALSE);
SDL_ShowCursor(1);
if (guest_cursor &&
(gui_grab || qemu_input_is_absolute() || absolute_enabled)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment