From f69917010a42d481d89d2c4196711df31fbe1eab Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 14 Jan 2023 14:57:03 -0500 Subject: [PATCH] use SDL2main --- CMakeLists.txt | 3 +++ src/main.cpp | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9af0ba74..80e2c2fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,6 +265,9 @@ if (USE_SDL2) if (MSVC) list(APPEND DEPENDENCIES_COMPILE_OPTIONS "/DHAVE_LIBC") endif() + if (WIN32) + list(APPEND DEPENDENCIES_LIBRARIES SDL2main) + endif() message(STATUS "Using vendored SDL2") endif() else() diff --git a/src/main.cpp b/src/main.cpp index a16bce1c..7d797fcf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -613,7 +613,3 @@ int main(int argc, char** argv) { #endif return 0; } - -#ifdef _WIN32 -#include "winMain.cpp" -#endif