[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/20] ui/sdl2: pass horizontal scroll information to the device c
From: |
Gerd Hoffmann |
Subject: |
[PULL 19/20] ui/sdl2: pass horizontal scroll information to the device code |
Date: |
Fri, 14 Jan 2022 07:53:25 +0100 |
From: Dmitry Petrov <dpetroff@gmail.com>
Signed-off-by: Dmitry Petrov <dpetroff@gmail.com>
Message-Id: <20220108153947.171861-5-dpetroff@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/sdl2.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 0bd30504cfcc..46a252d7d9d7 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -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;
}
--
2.34.1
- [PULL 11/20] hw/display/vga-mmio: Inline vga_mm_init(), (continued)
- [PULL 11/20] hw/display/vga-mmio: Inline vga_mm_init(), Gerd Hoffmann, 2022/01/14
- [PULL 12/20] hw/display/vga-mmio: QOM'ify vga_mmio_init() as TYPE_VGA_MMIO, Gerd Hoffmann, 2022/01/14
- [PULL 15/20] edid: Added support for 4k@60 Hz monitor, Gerd Hoffmann, 2022/01/14
- [PULL 20/20] ui/input-legacy: pass horizontal scroll information, Gerd Hoffmann, 2022/01/14
- [PULL 07/20] ui/dbus: fix buffer-overflow detected by ASAN, Gerd Hoffmann, 2022/01/14
- [PULL 13/20] hw/mips/jazz: Inline vga_mmio_init() and remove it, Gerd Hoffmann, 2022/01/14
- [PULL 17/20] ui/cocoa: pass horizontal scroll information to the device code, Gerd Hoffmann, 2022/01/14
- [PULL 14/20] edid: set default resolution to 1280x800 (WXGA), Gerd Hoffmann, 2022/01/14
- [PULL 16/20] ps2: Initial horizontal scroll support, Gerd Hoffmann, 2022/01/14
- [PULL 18/20] ui/gtk: pass horizontal scroll information to the device code, Gerd Hoffmann, 2022/01/14
- [PULL 19/20] ui/sdl2: pass horizontal scroll information to the device code,
Gerd Hoffmann <=
- Re: [PULL 00/20] Kraxel 20220114 patches, Peter Maydell, 2022/01/14