Merge pull request #302 from Fenex/refactor/rm-msvc-main

Removed unused declared windows-main entryapp function
This commit is contained in:
Yury Zhuravlev
2020-08-15 17:25:17 +09:00
committed by GitHub

View File

@@ -98,13 +98,7 @@ XStream xtRTO_Log;
int xtSysQuantDisabled = 0;
extern bool XGR_FULL_SCREEN;
//win_arg not working no
#ifdef win_arg
int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
#else
int main(int argc, char *argv[])
#endif
{
#ifdef __HAIKU__
const char *data_dir = getenv("VANGERS_DATA");
@@ -116,6 +110,7 @@ int main(int argc, char *argv[])
XRuntimeObject* XObj;
__internal_argc = argc;
__internal_argv = argv;
#ifdef _WIN32
std::cout<<"Load backtrace"<<std::endl;
LoadLibraryA("backtrace.dll");
@@ -123,22 +118,15 @@ int main(int argc, char *argv[])
SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
putenv("SDL_AUDIODRIVER=DirectSound");
#endif
//win_arg not working no
#ifdef win_arg
std::string cmd_line = szCmdLine;
if(cmd_line.find("-fullscreen") != std::string::npos) {
XGR_FULL_SCREEN = true;
}
#else
int i;
for(i=1; i < argc; i++) {
for (int i = 1; i < argc; i++) {
std::string cmd_key = argv[i];
if (cmd_key == "-fullscreen")
XGR_FULL_SCREEN = true;
else if (cmd_key == "-russian")
setLang(RUSSIAN);
}
#endif
#if defined(__unix__) || defined(__linux__) || defined(__APPLE__)
std::cout<<"Set locale. ";
char* res = setlocale(LC_NUMERIC, "POSIX");