mirror of
https://github.com/glest/glest-source.git
synced 2025-09-02 20:42:34 +02:00
- fix windows build
This commit is contained in:
@@ -6020,8 +6020,7 @@ void EnableCrashingOnCrashes() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int glestMainSEHWrapper(int argc, char** argv) {
|
int glestMainSEHWrapper(int argc, char** argv) {
|
||||||
|
int result = 0;
|
||||||
bool isSteamMode = hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_STEAM]);
|
|
||||||
#ifdef WIN32_STACK_TRACE
|
#ifdef WIN32_STACK_TRACE
|
||||||
//printf("Hooking up WIN32_STACK_TRACE...\n");
|
//printf("Hooking up WIN32_STACK_TRACE...\n");
|
||||||
__try {
|
__try {
|
||||||
@@ -6041,17 +6040,8 @@ __try {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
initSpecialStrings();
|
initSpecialStrings();
|
||||||
int result = 0;
|
|
||||||
|
|
||||||
IRCThread::setGlobalCacheContainerName(GameConstants::ircClientCacheLookupKey);
|
IRCThread::setGlobalCacheContainerName(GameConstants::ircClientCacheLookupKey);
|
||||||
|
|
||||||
if(isSteamMode == true) {
|
|
||||||
if (!STEAMSHIM_init()) {
|
|
||||||
printf("Steam API init failed, terminating.\n");
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
result = glestMain(argc, argv);
|
result = glestMain(argc, argv);
|
||||||
|
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
@@ -6069,12 +6059,8 @@ __try {
|
|||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isSteamMode == true) {
|
|
||||||
STEAMSHIM_deinit();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
return result;
|
|
||||||
#ifdef WIN32_STACK_TRACE
|
#ifdef WIN32_STACK_TRACE
|
||||||
}
|
}
|
||||||
__except(stackdumper(0, GetExceptionInformation(),true), EXCEPTION_CONTINUE_SEARCH) {
|
__except(stackdumper(0, GetExceptionInformation(),true), EXCEPTION_CONTINUE_SEARCH) {
|
||||||
@@ -6082,6 +6068,7 @@ __except(stackdumper(0, GetExceptionInformation(),true), EXCEPTION_CONTINUE_SEAR
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int glestMainWrapper(int argc, char** argv) {
|
int glestMainWrapper(int argc, char** argv) {
|
||||||
@@ -6142,7 +6129,21 @@ int glestMainWrapper(int argc, char** argv) {
|
|||||||
SocketManager winSockManager;
|
SocketManager winSockManager;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
bool isSteamMode = hasCommandArgument(argc, argv, GAME_ARGS[GAME_ARG_STEAM]);
|
||||||
|
if (isSteamMode == true) {
|
||||||
|
if (!STEAMSHIM_init()) {
|
||||||
|
printf("Steam API init failed, terminating.\n");
|
||||||
|
return 42;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int result = glestMainSEHWrapper(argc, argv);
|
int result = glestMainSEHWrapper(argc, argv);
|
||||||
|
|
||||||
|
if (isSteamMode == true) {
|
||||||
|
STEAMSHIM_deinit();
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user