Explorar o código

Merge pull request #1495 from ogniK5377/break-stop

Stop all threads on svcBreak
bunnei %!s(int64=7) %!d(string=hai) anos
pai
achega
b183ce4365
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/core/hle/kernel/svc.cpp

+ 6 - 0
src/core/hle/kernel/svc.cpp

@@ -389,6 +389,12 @@ static void Break(u32 reason, u64 info1, u64 info2) {
             "Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
             reason, info1, info2);
         ASSERT(false);
+
+        Core::CurrentProcess()->PrepareForTermination();
+
+        // Kill the current thread
+        GetCurrentThread()->Stop();
+        Core::System::GetInstance().PrepareReschedule();
     }
 }