From 60cf3dfebc6bc573fb90a1b9645bca43da3d65f6 Mon Sep 17 00:00:00 2001 From: Mary Date: Wed, 9 Jun 2021 00:50:18 +0200 Subject: Do not clear gpu subchannel state on BindChannel (#2348) This fixes a regression caused by #980, that was causing a crash on New Super Lucky's Tale. As always, this need feedback on possible regression on any games. Fix #2343. --- Ryujinx.Graphics.Gpu/State/GpuState.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Ryujinx.Graphics.Gpu/State') diff --git a/Ryujinx.Graphics.Gpu/State/GpuState.cs b/Ryujinx.Graphics.Gpu/State/GpuState.cs index 4b93dd45..16dad5c1 100644 --- a/Ryujinx.Graphics.Gpu/State/GpuState.cs +++ b/Ryujinx.Graphics.Gpu/State/GpuState.cs @@ -210,6 +210,17 @@ namespace Ryujinx.Graphics.Gpu.State _registers[(int)offset].Callback = callback; } + /// + /// Clear all registered callbacks. + /// + public void ClearCallbacks() + { + for (int index = 0; index < _registers.Length; index++) + { + _registers[index].Callback = null; + } + } + /// /// Checks if a given register has been modified since the last call to this method. /// -- cgit v1.2.3