瀏覽代碼

Break: don't crash when bit 31 is set (#444)

Thomas Guillemard 7 年之前
父節點
當前提交
65c67bb4a5
共有 1 個文件被更改,包括 10 次插入2 次删除
  1. 10 2
      Ryujinx.HLE/HOS/Kernel/SvcSystem.cs

+ 10 - 2
Ryujinx.HLE/HOS/Kernel/SvcSystem.cs

@@ -247,9 +247,17 @@ namespace Ryujinx.HLE.HOS.Kernel
             long Unknown = (long)ThreadState.X1;
             long Info    = (long)ThreadState.X2;
 
-            Process.PrintStackTrace(ThreadState);
+            if ((Reason & (1 << 31)) == 0)
+            {
+                Process.PrintStackTrace(ThreadState);
 
-            throw new GuestBrokeExecutionException();
+                throw new GuestBrokeExecutionException();
+            }
+            else
+            {
+                Device.Log.PrintInfo(LogClass.KernelSvc, "Debugger triggered");
+                Process.PrintStackTrace(ThreadState);
+            }
         }
 
         private void SvcOutputDebugString(AThreadState ThreadState)