aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libui_sdl/main.cpp')
-rw-r--r--src/libui_sdl/main.cpp39
1 files changed, 1 insertions, 38 deletions
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp
index 8e8bf9e..64bc532 100644
--- a/src/libui_sdl/main.cpp
+++ b/src/libui_sdl/main.cpp
@@ -2678,7 +2678,7 @@ void RecreateMainWindow(bool opengl)
}
-int main(int argc, char** argv)
+int ___main(int argc, char** argv)
{
srand(time(NULL));
@@ -3026,41 +3026,4 @@ int main(int argc, char** argv)
return 0;
}
-#ifdef __WIN32__
-#include <windows.h>
-
-int CALLBACK WinMain(HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int cmdshow)
-{
- int argc = 0;
- wchar_t** argv_w = CommandLineToArgvW(GetCommandLineW(), &argc);
- char* nullarg = "";
-
- char** argv = new char*[argc];
- for (int i = 0; i < argc; i++)
- {
- int len = WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1, NULL, 0, NULL, NULL);
- if (len < 1) return NULL;
- argv[i] = new char[len];
- int res = WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1, argv[i], len, NULL, NULL);
- if (res != len) { delete[] argv[i]; argv[i] = nullarg; }
- }
-
- if (AttachConsole(ATTACH_PARENT_PROCESS))
- {
- freopen("CONOUT$", "w", stdout);
- freopen("CONOUT$", "w", stderr);
- printf("\n");
- }
-
- int ret = main(argc, argv);
-
- printf("\n\n>");
-
- for (int i = 0; i < argc; i++) if (argv[i] != nullarg) delete[] argv[i];
- delete[] argv;
-
- return ret;
-}
-
-#endif