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
This commit is contained in:
Sam Lantinga
2025-07-31 08:49:40 -07:00
parent bf7b4d4a9e
commit 26c41f3f9a
2 changed files with 2 additions and 6 deletions

View File

@@ -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