SDL: Separate wmain() and main() implementations

From 7f0801377b995e9b8e461737c28e14d6fb7043a5 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 7 Jan 2023 08:28:07 -0800
Subject: [PATCH] Separate wmain() and main() implementations

Fixes https://github.com/libsdl-org/SDL/issues/7010
---
 include/SDL3/SDL_main_impl.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/SDL3/SDL_main_impl.h b/include/SDL3/SDL_main_impl.h
index 79902bfb81e3..7fceb79a4897 100644
--- a/include/SDL3/SDL_main_impl.h
+++ b/include/SDL3/SDL_main_impl.h
@@ -64,14 +64,20 @@ typedef wchar_t* PWSTR;
 /* This is where execution begins [console apps] */
 #if defined( UNICODE ) && UNICODE
 int wmain(int argc, wchar_t *wargv[], wchar_t *wenvp)
+{
+    (void)argc;
+    (void)wargv;
+    (void)wenvp;
+    return SDL_RunApp(0, NULL, SDL_main, NULL);
+}
 #else /* ANSI */
 int main(int argc, char *argv[])
-#endif
 {
     (void)argc;
     (void)argv;
     return SDL_RunApp(0, NULL, SDL_main, NULL);
 }
+#endif /* UNICODE */
 
 #endif /* _MSC_VER && ! __GDK__ */