From bb54a3165713f51264b598db0d7050aa1ea50815 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 22 Jan 2024 22:28:57 +0800 Subject: [PATCH 1/2] remove subsystem --- packages/l/libsdl/xmake.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/l/libsdl/xmake.lua b/packages/l/libsdl/xmake.lua index 366482e5e08..85a26a3c8d5 100644 --- a/packages/l/libsdl/xmake.lua +++ b/packages/l/libsdl/xmake.lua @@ -104,11 +104,9 @@ package("libsdl") local libsuffix = package:is_debug() and "d" or "" component:add("links", "SDL2main" .. libsuffix) if package:is_plat("windows") then - component:add("ldflags", "-subsystem:windows") component:add("syslinks", "shell32") elseif package:is_plat("mingw") then component:add("syslinks", "mingw32") - component:add("ldflags", "-mwindows") end component:add("deps", "lib") end) From efaebc478ae6b5f12fce8c48e849ae6c6513e43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Mon, 22 Jan 2024 16:55:20 +0100 Subject: [PATCH 2/2] Update xmake.lua --- packages/l/libsdl/xmake.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/l/libsdl/xmake.lua b/packages/l/libsdl/xmake.lua index 85a26a3c8d5..ae7a06508e7 100644 --- a/packages/l/libsdl/xmake.lua +++ b/packages/l/libsdl/xmake.lua @@ -232,7 +232,8 @@ package("libsdl") #include int main(int argc, char** argv) { SDL_Init(0); + SDL_Quit(); return 0; } - ]]})); + ]]}, configs = {defines = "SDL_MAIN_HANDLED"})); end)