sdl2: fix build failure on windows
PATCH 1/1 sdl2: fix build failure on windows
Cc Stefan Weil <[email protected]>
Cc Samuel Thibault <[email protected]>
Signed-off-by Gerd Hoffmann <[email protected]>
--- ui/sdl2.c | 6 ++++++ 1 file changed, 6 insertions(+)
ui/sdl2.c +6 -0
@@ -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. */
Signature · 1 line
1.8.3.1
Am 13.01.2017 um 09:14 schrieb Gerd Hoffmann:
Quoted 17 lines
Cc Stefan Weil <[email protected]>Cc Samuel Thibault <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>--- ui/sdl2.c | 6 ++++++ 1 file changed, 6 insertions(+)ui/sdl2.c +1
-0@@ -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)) {
ui/sdl2.c void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) · line 831
Quoted 10 lines
ui/sdl2.c +5
-0+#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. */
Thanks.
Reviewed-by Stefan Weil <[email protected]>
Quoted 27 lines · Stefan Weil
Am 13.01.2017 um 09:14 schrieb Gerd Hoffmann:
Quoted 26 lines
Cc Stefan Weil <[email protected]>Cc Samuel Thibault <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>--- ui/sdl2.c | 6 ++++++ 1 file changed, 6 insertions(+)ui/sdl2.c +6
-0@@ -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 }
Quoted 6 lines
ui/sdl2.c void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) · line 831
Quoted 1 line
ui/sdl2.c +0
-0/* Load a 32x32x4 image. White pixels are transparent. */ Thanks.
Reviewed-by Stefan Weil <[email protected]>
Thanks; applied to master as a buildfix.
-- PMM