From 92fae7e1abcf4c44a3c4abdabdd9b8586560a30c Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sun, 14 Oct 2018 18:14:51 +1100 Subject: Stop all threads on svcBreak This should help diagnose crashes easier and prevent many users thinking that a game is still running when in fact it's just an audio thread still running(this is typically not killed when svcBreak is hit since the game expects us to do this) --- src/core/hle/kernel/svc.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/hle/kernel/svc.cpp') diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index e406df829..198865fd0 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/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(); } } -- cgit v1.2.3