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(); }