ports/devel/sdl2/patches/patch-src_SDL_c

17 lines
401 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
- Allow custom SDL GetPlatform name with env var SDL_PLATFORM
Index: src/SDL.c
--- src/SDL.c.orig
+++ src/SDL.c
@@ -544,6 +544,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 __AIX__
return "AIX";
#elif __ANDROID__