Selaa lähdekoodia

Separate wmain() and main() implementations

Fixes https://github.com/libsdl-org/SDL/issues/7010
Sam Lantinga 2 vuotta sitten
vanhempi
commit
7f0801377b
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      include/SDL3/SDL_main_impl.h

+ 7 - 1
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__ */