MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / ShowErrorMessage

Function ShowErrorMessage

ogsr_engine/xrCore/xrDebugNew.cpp:32–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30extern bool OnMainThread();
31
32static void ShowErrorMessage(const char* msg, const bool show_msg = false)
33{
34 extern void LogD3D11DebugMessages();
35 LogD3D11DebugMessages();
36
37 const bool on_ttapi_thread = !OnMainThread();
38
39 if (!on_ttapi_thread)
40 {
41 ShowWindow(gGameWindow, SW_HIDE);
42
43 while (ShowCursor(TRUE) < 0)
44 ;
45 }
46
47 if (!IsDebuggerPresent())
48 {
49 if (!show_msg)
50 if (open_log())
51 return;
52
53 if (!on_ttapi_thread)
54 MessageBox(gGameWindow, msg, "FATAL ERROR", MB_OK | MB_ICONERROR | MB_SYSTEMMODAL);
55 }
56}
57
58static const char* GetThreadName()
59{

Callers 3

do_exitMethod · 0.85
backendMethod · 0.85
UnhandledFilterFunction · 0.85

Calls 3

LogD3D11DebugMessagesFunction · 0.85
open_logFunction · 0.85
OnMainThreadFunction · 0.50

Tested by

no test coverage detected