Parcourir la source

Fix Android build

- Android defines SDL_PLATFORM_UNIX but does not compile core/unix sources
  so add checks for SDL_PLATFORM_ANDROID where SDL_gtk is used.

- Fix missing void parameter list in SDL_Gtk_EnterContext.

- Remove unneeded SDL_gtk.h include in SDL_events.c
Sam Lantinga il y a 1 mois
Parent
commit
26c41f3f9a
2 fichiers modifiés avec 2 ajouts et 6 suppressions
  1. 2 2
      src/SDL.c
  2. 0 4
      src/events/SDL_events.c

+ 2 - 2
src/SDL.c

@@ -30,7 +30,7 @@
 // this checks for HAVE_DBUS_DBUS_H internally.
 #include "core/linux/SDL_dbus.h"
 
-#ifdef SDL_PLATFORM_UNIX
+#if defined(SDL_PLATFORM_UNIX) && !defined(SDL_PLATFORM_ANDROID)
 #include "core/unix/SDL_gtk.h"
 #endif
 
@@ -667,7 +667,7 @@ void SDL_Quit(void)
     SDL_DBus_Quit();
 #endif
 
-#ifdef SDL_PLATFORM_UNIX
+#if defined(SDL_PLATFORM_UNIX) && !defined(SDL_PLATFORM_ANDROID)
     SDL_Gtk_Quit();
 #endif
 

+ 0 - 4
src/events/SDL_events.c

@@ -42,10 +42,6 @@
 #include "../video/android/SDL_androidevents.h"
 #endif
 
-#ifdef SDL_PLATFORM_UNIX
-#include "../core/unix/SDL_gtk.h"
-#endif
-
 // An arbitrary limit so we don't have unbounded growth
 #define SDL_MAX_QUEUED_EVENTS 65535