ports/devel/sdl2/patches/patch-src_SDL_c

17 lines
417 B
Text
Raw Normal View History

allow custom SDL GetPlatform name with env var SDL_PLATFORM
2023-08-16 22:26:55 +00:00
Index: src/SDL.c
--- src/SDL.c.orig
+++ src/SDL.c
@@ -566,6 +566,10 @@ int SDL_GetRevisionNumber(void)
2023-08-16 22:26:55 +00:00
/* Get the name of the platform */
const char *SDL_GetPlatform(void)
{
+ const char *platform;
+ if (platform = SDL_getenv("SDL_PLATFORM")) {
+ return platform;
+ }
#if defined(__AIX__)
2023-08-16 22:26:55 +00:00
return "AIX";
#elif defined(__ANDROID__)