From f3a456d3539ac7394f0387072bd2e8e105e4ac22 Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Tue, 17 Mar 2026 08:13:17 +0900 Subject: [PATCH] [Base/Debugging] Replaces x86 hack with arch agnostic Win32 API call --- src/xenia/base/debugging_win.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/xenia/base/debugging_win.cc b/src/xenia/base/debugging_win.cc index 9571b2600..70d13a058 100644 --- a/src/xenia/base/debugging_win.cc +++ b/src/xenia/base/debugging_win.cc @@ -15,10 +15,7 @@ namespace xe { namespace debugging { -bool IsDebuggerAttached() { - return reinterpret_cast( - __readgsqword(0x60))[2]; // get BeingDebugged field of PEB -} +bool IsDebuggerAttached() { return ::IsDebuggerPresent() != 0; } void Break() { __debugbreak(); }