diff options
author | Dmitry Petrov <dpetroff@gmail.com> | 2022-01-08 16:39:46 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2022-01-13 15:33:18 +0100 |
commit | ed80f503a1cd31ee547bb44f7e13ea313733e8cc (patch) | |
tree | e538f9271e6120e3b56994ceb62776266d75f66a /ui/sdl2.c | |
parent | 13cb360f6e60fca63b90ec0ff96f6135d937a1af (diff) | |
download | qemu-ed80f503a1cd31ee547bb44f7e13ea313733e8cc.zip qemu-ed80f503a1cd31ee547bb44f7e13ea313733e8cc.tar.gz qemu-ed80f503a1cd31ee547bb44f7e13ea313733e8cc.tar.bz2 |
ui/sdl2: pass horizontal scroll information to the device code
Signed-off-by: Dmitry Petrov <dpetroff@gmail.com>
Message-Id: <20220108153947.171861-5-dpetroff@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/sdl2.c')
-rw-r--r-- | ui/sdl2.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -33,6 +33,7 @@ #include "sysemu/runstate-action.h" #include "sysemu/sysemu.h" #include "ui/win32-kbd-hook.h" +#include "qemu/log.h" static int sdl2_num_outputs; static struct sdl2_console *sdl2_console; @@ -535,6 +536,10 @@ static void handle_mousewheel(SDL_Event *ev) btn = INPUT_BUTTON_WHEEL_UP; } else if (wev->y < 0) { btn = INPUT_BUTTON_WHEEL_DOWN; + } else if (wev->x < 0) { + btn = INPUT_BUTTON_WHEEL_RIGHT; + } else if (wev->x > 0) { + btn = INPUT_BUTTON_WHEEL_LEFT; } else { return; } |