From 7221068d68eab62450ed74fa0aa671117b897b13 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 7 Oct 2019 18:59:18 +0200 Subject: [PATCH] - fixed compilation on Windows. --- src/d_net.cpp | 2 +- src/win32/i_main.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/d_net.cpp b/src/d_net.cpp index 0ad9fd761..4ea77a61d 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -1569,7 +1569,7 @@ bool D_ArbitrateNetStart (void) // Return right away if we're just playing with ourselves. if (doomcom.numnodes == 1) - return; + return true; autostart = true; diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index 2cef5815a..afd2207e4 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -772,7 +772,7 @@ static void UnTbp() // //========================================================================== -void DoMain (HINSTANCE hInstance) +int DoMain (HINSTANCE hInstance) { LONG WinWidth, WinHeight; int height, width, x, y; @@ -876,7 +876,7 @@ void DoMain (HINSTANCE hInstance) WCHAR progbuff[1024]; if (GetModuleFileNameW(nullptr, progbuff, sizeof progbuff) == 0) { - MessageBoc(nullptr, "Fatal", "Could not determine program location.", MB_ICONEXCLAMATION|MB_OK); + MessageBoxA(nullptr, "Fatal", "Could not determine program location.", MB_ICONEXCLAMATION|MB_OK); exit(-1); } @@ -1015,7 +1015,6 @@ void I_ShowFatalError(const char *msg) RestoreConView (); S_StopMusic(true); I_FlushBufferedConsoleStuff(); - auto msg = error.what(); if (CVMAbortException::stacktrace.IsNotEmpty()) { @@ -1309,11 +1308,11 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE nothing, LPWSTR cmdline, int //_crtBreakAlloc = 177312; #endif - DoMain (hInstance); + int ret = DoMain (hInstance); CloseHandle (MainThread); MainThread = INVALID_HANDLE_VALUE; - return 0; + return ret; } // each platform has its own specific version of this function.