From 85c2c3fdc8848353f0ad7697c8f47c56e9aafb60 Mon Sep 17 00:00:00 2001 From: takase1121 <20792268+takase1121@users.noreply.github.com> Date: Wed, 4 Jun 2025 12:16:19 +0800 Subject: [PATCH] main: keep PLATFORM consistent between SDL2 and SDL3 --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 7381f2a..4642a85 100644 --- a/src/main.c +++ b/src/main.c @@ -174,7 +174,9 @@ init_lua: } 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_pushstring(L, LITE_ARCH_TUPLE);