aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/Makefile.objs7
-rw-r--r--ui/sdl.c3
-rw-r--r--ui/sdl2.c3
3 files changed, 6 insertions, 7 deletions
diff --git a/ui/Makefile.objs b/ui/Makefile.objs
index 801cba2675..b25e85f68e 100644
--- a/ui/Makefile.objs
+++ b/ui/Makefile.objs
@@ -16,7 +16,12 @@ common-obj-$(CONFIG_CURSES) += curses.o
common-obj-$(CONFIG_VNC) += $(vnc-obj-y)
common-obj-$(CONFIG_GTK) += gtk.o x_keymap.o
-sdl.mo-objs := sdl.o sdl_zoom.o sdl2.o
+ifeq ($(CONFIG_SDLABI),1.2)
+sdl.mo-objs := sdl.o sdl_zoom.o
+endif
+ifeq ($(CONFIG_SDLABI),2.0)
+sdl.mo-objs := sdl2.o
+endif
sdl.mo-cflags := $(SDL_CFLAGS)
gtk.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS)
diff --git a/ui/sdl.c b/ui/sdl.c
index 94c1d9dc3a..3e9d81076b 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -26,8 +26,6 @@
#undef WIN32_LEAN_AND_MEAN
#include <SDL.h>
-
-#if SDL_MAJOR_VERSION == 1
#include <SDL_syswm.h>
#include "qemu-common.h"
@@ -958,4 +956,3 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
atexit(sdl_cleanup);
}
-#endif
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 1ad74baafc..45f23b15e0 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -27,8 +27,6 @@
#undef WIN32_LEAN_AND_MEAN
#include <SDL.h>
-
-#if SDL_MAJOR_VERSION == 2
#include <SDL_syswm.h>
#include "qemu-common.h"
@@ -912,4 +910,3 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
atexit(sdl_cleanup);
}
-#endif