diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2018-06-26 16:44:57 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2018-06-26 16:44:57 +0100 |
| commit | 0ab4c574a55448a37b9f616259b82950742c9427 (patch) | |
| tree | 760945aa3534ab90f10959e58870cc8a394502fe /ui/sdl2.c | |
| parent | bd4e4a387aa733e40270a7406c7d111f2292de65 (diff) | |
| parent | 49213b721f4620364aa09142b5f4d559fed26b53 (diff) | |
| download | focaccia-qemu-0ab4c574a55448a37b9f616259b82950742c9427.tar.gz focaccia-qemu-0ab4c574a55448a37b9f616259b82950742c9427.zip | |
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180626-pull-request' into staging
ui: sdl2 fixes, gles support. # gpg: Signature made Tue 26 Jun 2018 14:56:15 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20180626-pull-request: sdl2: add checking for NULL sdl2: fix copypaste issues Add gles support to egl-helpers, wire up in egl-headless and gtk. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/sdl2.c')
| -rw-r--r-- | ui/sdl2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c index 3ae4719c32..76e59427cc 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -424,7 +424,7 @@ static void handle_keyup(SDL_Event *ev) static void handle_textinput(SDL_Event *ev) { - struct sdl2_console *scon = get_scon_from_window(ev->key.windowID); + struct sdl2_console *scon = get_scon_from_window(ev->text.windowID); QemuConsole *con = scon ? scon->dcl.con : NULL; if (qemu_console_is_graphic(con)) { @@ -436,9 +436,9 @@ static void handle_textinput(SDL_Event *ev) static void handle_mousemotion(SDL_Event *ev) { int max_x, max_y; - struct sdl2_console *scon = get_scon_from_window(ev->key.windowID); + struct sdl2_console *scon = get_scon_from_window(ev->motion.windowID); - if (!qemu_console_is_graphic(scon->dcl.con)) { + if (!scon || !qemu_console_is_graphic(scon->dcl.con)) { return; } @@ -468,9 +468,9 @@ static void handle_mousebutton(SDL_Event *ev) { int buttonstate = SDL_GetMouseState(NULL, NULL); SDL_MouseButtonEvent *bev; - struct sdl2_console *scon = get_scon_from_window(ev->key.windowID); + struct sdl2_console *scon = get_scon_from_window(ev->button.windowID); - if (!qemu_console_is_graphic(scon->dcl.con)) { + if (!scon || !qemu_console_is_graphic(scon->dcl.con)) { return; } @@ -492,11 +492,11 @@ static void handle_mousebutton(SDL_Event *ev) static void handle_mousewheel(SDL_Event *ev) { - struct sdl2_console *scon = get_scon_from_window(ev->key.windowID); + struct sdl2_console *scon = get_scon_from_window(ev->wheel.windowID); SDL_MouseWheelEvent *wev = &ev->wheel; InputButton btn; - if (!qemu_console_is_graphic(scon->dcl.con)) { + if (!scon || !qemu_console_is_graphic(scon->dcl.con)) { return; } |