sdl2: fix build failure on windows
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 13 Jan 2017 08:14:45 +0000 (09:14 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 13 Jan 2017 10:56:17 +0000 (10:56 +0000)
Cc: Stefan Weil <sw@weilnetz.de>
Cc: Samuel Thibault <samuel.thibault@gnu.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1484295285-8809-1-git-send-email-kraxel@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
ui/sdl2.c

index 9a79b17b9224cc4e97eca937e0500636906606f3..91fb111aa580a43480d056b7bc4c5a9e507fe4ee 100644 (file)
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -817,9 +817,15 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
         sdl2_console[i].dcl.con = con;
         register_displaychangelistener(&sdl2_console[i].dcl);
 
+#if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_X11)
         if (SDL_GetWindowWMInfo(sdl2_console[i].real_window, &info)) {
+#if defined(SDL_VIDEO_DRIVER_WINDOWS)
+            qemu_console_set_window_id(con, (uintptr_t)info.info.win.window);
+#elif defined(SDL_VIDEO_DRIVER_X11)
             qemu_console_set_window_id(con, info.info.x11.window);
+#endif
         }
+#endif
     }
 
     /* Load a 32x32x4 image. White pixels are transparent. */