diff --git a/src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs b/src/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs index 80671ccc1..7c73cd09d 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 b2ec6f964..2527d96e5 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(); } } }