diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/sdl2.c | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -169,10 +169,10 @@ static void sdl_hide_cursor(void) return; } - if (qemu_input_is_absolute()) { - SDL_ShowCursor(1); - SDL_SetCursor(sdl_cursor_hidden); - } else { + SDL_ShowCursor(SDL_DISABLE); + SDL_SetCursor(sdl_cursor_hidden); + + if (!qemu_input_is_absolute()) { SDL_SetRelativeMouseMode(SDL_TRUE); } } @@ -185,14 +185,16 @@ 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)) { - SDL_SetCursor(guest_sprite); - } else { - SDL_SetCursor(sdl_cursor_normal); - } } + + if (guest_cursor && + (gui_grab || qemu_input_is_absolute() || absolute_enabled)) { + SDL_SetCursor(guest_sprite); + } else { + SDL_SetCursor(sdl_cursor_normal); + } + + SDL_ShowCursor(SDL_ENABLE); } static void sdl_grab_start(struct sdl2_console *scon) |