main: keep PLATFORM consistent between SDL2 and SDL3

This commit is contained in:
takase1121
2025-06-05 11:03:45 +08:00
parent b5317c5318
commit 85c2c3fdc8
+3 -1
View File
@@ -174,7 +174,9 @@ init_lua:
} }
lua_setglobal(L, "ARGS"); lua_setglobal(L, "ARGS");
lua_pushstring(L, SDL_GetPlatform()); // hack to keep backwards compatibility with other PLATFORM enums
const char *platform = SDL_GetPlatform();
lua_pushstring(L, SDL_strcmp(platform, "macOS") == 0 ? "Mac OS X" : platform);
lua_setglobal(L, "PLATFORM"); lua_setglobal(L, "PLATFORM");
lua_pushstring(L, LITE_ARCH_TUPLE); lua_pushstring(L, LITE_ARCH_TUPLE);