Made exception handler optional.

This commit is contained in:
Бранимир Караџић
2025-08-23 19:29:13 -07:00
parent 4e36f3f33d
commit eda38395dd
2 changed files with 14 additions and 1 deletions

View File

@@ -76,6 +76,9 @@ namespace bx
/// ///
void debugOutputCallstack(uint32_t _skip); void debugOutputCallstack(uint32_t _skip);
/// Install BX exception handler.
void installExceptionHandler();
} // namespace bx } // namespace bx
#endif // BX_DEBUG_H_HEADER_GUARD #endif // BX_DEBUG_H_HEADER_GUARD

View File

@@ -552,6 +552,16 @@ namespace bx
#endif // BX_CONFIG_EXCEPTION_HANDLING_* #endif // BX_CONFIG_EXCEPTION_HANDLING_*
ExceptionHandler s_exceptionHandler; void installExceptionHandler()
{
static bool s_installed = false;
if (!s_installed)
{
s_installed = true;
static ExceptionHandler s_exceptionHandler;
}
}
} // namespace bx } // namespace bx