From 9fcee7041e3e049d218f3bcdac74e5530c8de6b5 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Mon, 3 Jul 2023 19:40:38 +0100 Subject: [PATCH] [*] Amended Win7 fast fail path --- Source/Debug/ExceptionWatcher.Win32.cpp | 12 ++++++++++-- Source/Debug/Panic.cpp | 9 ++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Source/Debug/ExceptionWatcher.Win32.cpp b/Source/Debug/ExceptionWatcher.Win32.cpp index e33b52da..7951d5ea 100644 --- a/Source/Debug/ExceptionWatcher.Win32.cpp +++ b/Source/Debug/ExceptionWatcher.Win32.cpp @@ -420,13 +420,14 @@ namespace Aurora::Debug { } + if (AuSwInfo::IsWindows8Point1OrGreater()) { __fastfail('fokd'); } else { - ExitProcess(0); + TerminateProcess(GetCurrentProcess(), 0); } } } @@ -498,7 +499,14 @@ namespace Aurora::Debug report.resource.type = Telemetry::ENewBlackBoxResourceType::eLocal; Telemetry::ReportDyingBreath(report); - __fastfail('fokd'); + if (AuSwInfo::IsWindows8Point1OrGreater()) + { + __fastfail('fokd'); + } + else + { + TerminateProcess(GetCurrentProcess(), 0); + } } } diff --git a/Source/Debug/Panic.cpp b/Source/Debug/Panic.cpp index f8cd5176..47fb517d 100644 --- a/Source/Debug/Panic.cpp +++ b/Source/Debug/Panic.cpp @@ -116,7 +116,14 @@ namespace Aurora::Debug } #if defined(AURORA_IS_MODERNNT_DERIVED) - __fastfail('FCKD'); + if (AuSwInfo::IsWindows8Point1OrGreater()) + { + __fastfail('fokd'); + } + else + { + TerminateProcess(GetCurrentProcess(), 0); + } #else #if defined(AURORA_COMPILER_GCC) || defined(AURORA_COMPILER_CLANG) __builtin_trap();