ports/devel/sdl2/patches/patch-src_SDL_c

16 lines
417 B
Text

allow custom SDL GetPlatform name with env var SDL_PLATFORM
Index: src/SDL.c
--- src/SDL.c.orig
+++ src/SDL.c
@@ -566,6 +566,10 @@ int SDL_GetRevisionNumber(void)
/* 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__)
return "AIX";
#elif defined(__ANDROID__)