From 13c53657cc1d7b868ba89744bd4438fa34ec8b93 Mon Sep 17 00:00:00 2001 From: svc64 Date: Sat, 9 Dec 2023 15:09:56 +0200 Subject: [PATCH] Fix the kill command, improve stepping --- src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs | 6 +++--- src/Ryujinx.HLE/Switch.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs b/src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs index 80671ccc1b..7c73cd09d4 100644 --- a/src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs +++ b/src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs @@ -1247,10 +1247,10 @@ namespace Ryujinx.HLE.HOS.Kernel.Process return false; } _parent.KernelContext.CriticalSection.Enter(); - bool wasPaused = (target.SchedFlags & ThreadSchedState.LowMask) == ThreadSchedState.Paused; + bool waiting = target.MutexOwner != null || target.WaitingSync || target.WaitingInArbitration; target.Context.RequestDebugStep(); target.Resume(ThreadSchedState.ThreadPauseFlag); - if (wasPaused) + if (waiting) { lock (_parent._threadingLock) { @@ -1267,7 +1267,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process _parent.KernelContext.CriticalSection.Enter(); target.Suspend(ThreadSchedState.ThreadPauseFlag); - if (wasPaused) + if (waiting) { lock (_parent._threadingLock) { diff --git a/src/Ryujinx.HLE/Switch.cs b/src/Ryujinx.HLE/Switch.cs index b2ec6f964a..2527d96e56 100644 --- a/src/Ryujinx.HLE/Switch.cs +++ b/src/Ryujinx.HLE/Switch.cs @@ -161,8 +161,8 @@ namespace Ryujinx.HLE AudioDeviceDriver.Dispose(); FileSystem.Dispose(); Memory.Dispose(); - Debugger.Dispose(); ExitStatus.Set(); + Debugger.Dispose(); } } }