Skip to content

Commit 5f33228

Browse files
committed
xrDebug: use GEnv.isDedicatedServer
1 parent b39957d commit 5f33228

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

src/xrCore/_math.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ void __cdecl thread_entry(void* _params)
425425

426426
void thread_spawn(thread_t* entry, const char* name, unsigned stack, void* arglist)
427427
{
428-
xrDebug::Initialize(false);
428+
xrDebug::Initialize();
429429

430430
THREAD_STARTUP* startup = new THREAD_STARTUP();
431431
startup->entry = entry;

src/xrCore/xrCore.vcxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,9 @@
436436
<ProjectReference Include="$(SolutionDir)utils\xrMiscMath\xrMiscMath.vcxproj">
437437
<Project>{7885cf3c-ee04-4c67-9467-1fbf9a36b037}</Project>
438438
</ProjectReference>
439+
<ProjectReference Include="..\Layers\xrAPI\xrAPI.vcxproj">
440+
<Project>{1daec516-e52c-4a3c-a4da-ae3553e6e0f8}</Project>
441+
</ProjectReference>
439442
</ItemGroup>
440443
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
441444
<ImportGroup Label="ExtensionTargets">

src/xrCore/xrDebug.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ void WINAPI xrDebug::PreErrorHandler(INT_PTR)
613613
#endif
614614
}
615615

616-
void xrDebug::SetupExceptionHandler(const bool& dedicated)
616+
void xrDebug::SetupExceptionHandler()
617617
{
618618
#if defined(WINDOWS)
619619
const auto commandLine = GetCommandLine();
@@ -623,7 +623,7 @@ void xrDebug::SetupExceptionHandler(const bool& dedicated)
623623
SetErrorMode(prevMode | SEM_NOGPFAULTERRORBOX);
624624
BT_InstallSehFilter();
625625

626-
if (!dedicated && !strstr(commandLine, "-silent_error_mode"))
626+
if (!GEnv.isDedicatedServer && !strstr(commandLine, "-silent_error_mode"))
627627
BT_SetActivityType(BTA_SHOWUI);
628628
else
629629
BT_SetActivityType(BTA_SAVEREPORT);
@@ -821,11 +821,11 @@ void xrDebug::OnThreadSpawn()
821821
#endif
822822
}
823823

824-
void xrDebug::Initialize(const bool& dedicated)
824+
void xrDebug::Initialize()
825825
{
826826
*BugReportFile = 0;
827827
OnThreadSpawn();
828-
SetupExceptionHandler(dedicated);
828+
SetupExceptionHandler();
829829
SDL_SetAssertionHandler(SDLAssertionHandler, nullptr);
830830
// exception handler to all "unhandled" exceptions
831831
#if defined(WINDOWS)

src/xrCore/xrDebug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class XRCORE_API xrDebug
5757

5858
public:
5959
xrDebug() = delete;
60-
static void Initialize(const bool& dedicated);
60+
static void Initialize();
6161
static void Destroy();
6262
static void OnThreadSpawn();
6363

@@ -90,7 +90,7 @@ class XRCORE_API xrDebug
9090
static bool symEngineInitialized;
9191
static Lock dbgHelpLock;
9292
static void FormatLastError(char* buffer, const size_t& bufferSize);
93-
static void SetupExceptionHandler(const bool& dedicated);
93+
static void SetupExceptionHandler();
9494
static LONG WINAPI UnhandledFilter(EXCEPTION_POINTERS* exPtrs);
9595
static void WINAPI PreErrorHandler(INT_PTR);
9696
#if defined(WINDOWS)

src/xr_3da/entry_point.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ int entry_point(pcstr commandLine)
2020
if (strstr(commandLine, "-dedicated"))
2121
GEnv.isDedicatedServer = true;
2222

23-
xrDebug::Initialize(GEnv.isDedicatedServer);
23+
xrDebug::Initialize();
2424

2525
StickyKeyFilter filter;
2626
if (!GEnv.isDedicatedServer)

0 commit comments

Comments
 (0)