Skip to content

Commit 26c41f3

Browse files
committed
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
1 parent bf7b4d4 commit 26c41f3

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/SDL.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// this checks for HAVE_DBUS_DBUS_H internally.
3131
#include "core/linux/SDL_dbus.h"
3232

33-
#ifdef SDL_PLATFORM_UNIX
33+
#if defined(SDL_PLATFORM_UNIX) && !defined(SDL_PLATFORM_ANDROID)
3434
#include "core/unix/SDL_gtk.h"
3535
#endif
3636

@@ -667,7 +667,7 @@ void SDL_Quit(void)
667667
SDL_DBus_Quit();
668668
#endif
669669

670-
#ifdef SDL_PLATFORM_UNIX
670+
#if defined(SDL_PLATFORM_UNIX) && !defined(SDL_PLATFORM_ANDROID)
671671
SDL_Gtk_Quit();
672672
#endif
673673

src/events/SDL_events.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
#include "../video/android/SDL_androidevents.h"
4343
#endif
4444

45-
#ifdef SDL_PLATFORM_UNIX
46-
#include "../core/unix/SDL_gtk.h"
47-
#endif
48-
4945
// An arbitrary limit so we don't have unbounded growth
5046
#define SDL_MAX_QUEUED_EVENTS 65535
5147

0 commit comments

Comments
 (0)