From 9d659571034732c5c079d4aff83927e81b66728b Mon Sep 17 00:00:00 2001 From: Marco Carvalho Date: Wed, 6 Nov 2024 09:14:20 -0300 Subject: [PATCH 1/7] Migrate to .NET 9 --- Directory.Build.props | 5 +++++ global.json | 6 ------ src/ARMeilleure/ARMeilleure.csproj | 1 - .../Ryujinx.Audio.Backends.OpenAL.csproj | 1 - .../Ryujinx.Audio.Backends.SDL2.csproj | 1 - .../Ryujinx.Audio.Backends.SoundIo.csproj | 1 - src/Ryujinx.Audio/Ryujinx.Audio.csproj | 1 - src/Ryujinx.Common/Ryujinx.Common.csproj | 1 - src/Ryujinx.Cpu/Ryujinx.Cpu.csproj | 1 - src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj | 1 - src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj | 1 - src/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj | 1 - src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj | 1 - .../Ryujinx.Graphics.Nvdec.FFmpeg.csproj | 1 - .../Ryujinx.Graphics.Nvdec.Vp9.csproj | 1 - src/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj | 1 - src/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj | 1 - src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj | 1 - .../Ryujinx.Graphics.Texture.csproj | 1 - src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj | 1 - src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj | 1 - src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj | 1 - src/Ryujinx.HLE/Ryujinx.HLE.csproj | 1 - src/Ryujinx.Headless.SDL2/Ryujinx.Headless.SDL2.csproj | 1 - src/Ryujinx.Horizon.Common/Ryujinx.Horizon.Common.csproj | 1 - src/Ryujinx.Horizon/Ryujinx.Horizon.csproj | 1 - src/Ryujinx.Input.SDL2/Ryujinx.Input.SDL2.csproj | 1 - src/Ryujinx.Input/Ryujinx.Input.csproj | 1 - src/Ryujinx.Memory/Ryujinx.Memory.csproj | 1 - src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj | 1 - src/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj | 1 - src/Ryujinx.Tests.Memory/Ryujinx.Tests.Memory.csproj | 1 - src/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj | 1 - src/Ryujinx.Tests/Ryujinx.Tests.csproj | 1 - src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj | 1 - src/Ryujinx/Ryujinx.csproj | 1 - src/Spv.Generator/Spv.Generator.csproj | 1 - 37 files changed, 5 insertions(+), 41 deletions(-) create mode 100644 Directory.Build.props delete mode 100644 global.json diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 000000000..67b2324e3 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,5 @@ + + + net9.0 + + diff --git a/global.json b/global.json deleted file mode 100644 index 391ba3c2a..000000000 --- a/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sdk": { - "version": "8.0.100", - "rollForward": "latestFeature" - } -} diff --git a/src/ARMeilleure/ARMeilleure.csproj b/src/ARMeilleure/ARMeilleure.csproj index 550e50c26..fd8784a33 100644 --- a/src/ARMeilleure/ARMeilleure.csproj +++ b/src/ARMeilleure/ARMeilleure.csproj @@ -1,7 +1,6 @@ - net8.0 true diff --git a/src/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj b/src/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj index b5fd8f9e7..460c7c08a 100644 --- a/src/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj +++ b/src/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj @@ -1,7 +1,6 @@ - net8.0 diff --git a/src/Ryujinx.Audio.Backends.SDL2/Ryujinx.Audio.Backends.SDL2.csproj b/src/Ryujinx.Audio.Backends.SDL2/Ryujinx.Audio.Backends.SDL2.csproj index dd18e70a1..e0da201e7 100644 --- a/src/Ryujinx.Audio.Backends.SDL2/Ryujinx.Audio.Backends.SDL2.csproj +++ b/src/Ryujinx.Audio.Backends.SDL2/Ryujinx.Audio.Backends.SDL2.csproj @@ -1,7 +1,6 @@ - net8.0 true diff --git a/src/Ryujinx.Audio.Backends.SoundIo/Ryujinx.Audio.Backends.SoundIo.csproj b/src/Ryujinx.Audio.Backends.SoundIo/Ryujinx.Audio.Backends.SoundIo.csproj index 5c9423463..b8d32b944 100644 --- a/src/Ryujinx.Audio.Backends.SoundIo/Ryujinx.Audio.Backends.SoundIo.csproj +++ b/src/Ryujinx.Audio.Backends.SoundIo/Ryujinx.Audio.Backends.SoundIo.csproj @@ -1,7 +1,6 @@ - net8.0 true win-x64;osx-x64;linux-x64 diff --git a/src/Ryujinx.Audio/Ryujinx.Audio.csproj b/src/Ryujinx.Audio/Ryujinx.Audio.csproj index fc20f4ec4..57a280eee 100644 --- a/src/Ryujinx.Audio/Ryujinx.Audio.csproj +++ b/src/Ryujinx.Audio/Ryujinx.Audio.csproj @@ -1,7 +1,6 @@  - net8.0 true diff --git a/src/Ryujinx.Common/Ryujinx.Common.csproj b/src/Ryujinx.Common/Ryujinx.Common.csproj index dee462fdb..5efa3d0f7 100644 --- a/src/Ryujinx.Common/Ryujinx.Common.csproj +++ b/src/Ryujinx.Common/Ryujinx.Common.csproj @@ -1,7 +1,6 @@ - net8.0 true $(DefineConstants);$(ExtraDefineConstants) diff --git a/src/Ryujinx.Cpu/Ryujinx.Cpu.csproj b/src/Ryujinx.Cpu/Ryujinx.Cpu.csproj index 5a6bf5c3d..4565c27d8 100644 --- a/src/Ryujinx.Cpu/Ryujinx.Cpu.csproj +++ b/src/Ryujinx.Cpu/Ryujinx.Cpu.csproj @@ -1,7 +1,6 @@  - net8.0 true diff --git a/src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj b/src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj index 973a9e260..26f8b8163 100644 --- a/src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj +++ b/src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj @@ -1,7 +1,6 @@  - net8.0 diff --git a/src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj b/src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj index d88b641a3..0eca79cb2 100644 --- a/src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj +++ b/src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj @@ -1,7 +1,6 @@  - net8.0 diff --git a/src/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj b/src/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj index 6f1cce6ac..c5c5acedf 100644 --- a/src/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj +++ b/src/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj @@ -1,7 +1,6 @@  - net8.0 true diff --git a/src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj b/src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj index d631d039f..92bd69a23 100644 --- a/src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj +++ b/src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj @@ -1,7 +1,6 @@ - net8.0 diff --git a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Ryujinx.Graphics.Nvdec.FFmpeg.csproj b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Ryujinx.Graphics.Nvdec.FFmpeg.csproj index d1a6358c2..847e359c4 100644 --- a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Ryujinx.Graphics.Nvdec.FFmpeg.csproj +++ b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Ryujinx.Graphics.Nvdec.FFmpeg.csproj @@ -1,7 +1,6 @@  - net8.0 true diff --git a/src/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj b/src/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj index d1a6358c2..847e359c4 100644 --- a/src/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj +++ b/src/Ryujinx.Graphics.Nvdec.Vp9/Ryujinx.Graphics.Nvdec.Vp9.csproj @@ -1,7 +1,6 @@  - net8.0 true diff --git a/src/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj b/src/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj index 6c00e9a7c..b24c88fe5 100644 --- a/src/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj +++ b/src/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj @@ -1,7 +1,6 @@  - net8.0 true diff --git a/src/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj b/src/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj index f3071f486..e4502a1d8 100644 --- a/src/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj +++ b/src/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj @@ -1,7 +1,6 @@ - net8.0 true diff --git a/src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj b/src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj index 8ccf5348f..a240dc2fd 100644 --- a/src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj +++ b/src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj @@ -1,7 +1,6 @@ - net8.0 diff --git a/src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj b/src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj index 51721490e..7aa39a153 100644 --- a/src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj +++ b/src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj @@ -1,6 +1,5 @@ - net8.0 true diff --git a/src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj b/src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj index a6c4fb2bb..18fea54dd 100644 --- a/src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj +++ b/src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj @@ -1,7 +1,6 @@ - net8.0 true diff --git a/src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj b/src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj index abff58a53..a06c0e21a 100644 --- a/src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj +++ b/src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj @@ -1,7 +1,6 @@ - net8.0 diff --git a/src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj b/src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj index aae28733f..a429f3ac1 100644 --- a/src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj +++ b/src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj @@ -1,7 +1,6 @@ - net8.0 diff --git a/src/Ryujinx.HLE/Ryujinx.HLE.csproj b/src/Ryujinx.HLE/Ryujinx.HLE.csproj index 5f7f6db69..cd704a801 100644 --- a/src/Ryujinx.HLE/Ryujinx.HLE.csproj +++ b/src/Ryujinx.HLE/Ryujinx.HLE.csproj @@ -1,7 +1,6 @@ - net8.0 true diff --git a/src/Ryujinx.Headless.SDL2/Ryujinx.Headless.SDL2.csproj b/src/Ryujinx.Headless.SDL2/Ryujinx.Headless.SDL2.csproj index ebda97b46..a264e9b94 100644 --- a/src/Ryujinx.Headless.SDL2/Ryujinx.Headless.SDL2.csproj +++ b/src/Ryujinx.Headless.SDL2/Ryujinx.Headless.SDL2.csproj @@ -1,7 +1,6 @@ - net8.0 win-x64;osx-x64;linux-x64 Exe true diff --git a/src/Ryujinx.Horizon.Common/Ryujinx.Horizon.Common.csproj b/src/Ryujinx.Horizon.Common/Ryujinx.Horizon.Common.csproj index fa1544c4f..7230f7e0c 100644 --- a/src/Ryujinx.Horizon.Common/Ryujinx.Horizon.Common.csproj +++ b/src/Ryujinx.Horizon.Common/Ryujinx.Horizon.Common.csproj @@ -1,7 +1,6 @@ - net8.0 diff --git a/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj b/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj index bf34ddd17..809819273 100644 --- a/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj +++ b/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj @@ -1,7 +1,6 @@ - net8.0 diff --git a/src/Ryujinx.Input.SDL2/Ryujinx.Input.SDL2.csproj b/src/Ryujinx.Input.SDL2/Ryujinx.Input.SDL2.csproj index 1ab79d08a..1215fc987 100644 --- a/src/Ryujinx.Input.SDL2/Ryujinx.Input.SDL2.csproj +++ b/src/Ryujinx.Input.SDL2/Ryujinx.Input.SDL2.csproj @@ -1,7 +1,6 @@  - net8.0 true diff --git a/src/Ryujinx.Input/Ryujinx.Input.csproj b/src/Ryujinx.Input/Ryujinx.Input.csproj index 59a9eeb61..a3e4519e1 100644 --- a/src/Ryujinx.Input/Ryujinx.Input.csproj +++ b/src/Ryujinx.Input/Ryujinx.Input.csproj @@ -1,7 +1,6 @@ - net8.0 true diff --git a/src/Ryujinx.Memory/Ryujinx.Memory.csproj b/src/Ryujinx.Memory/Ryujinx.Memory.csproj index 8310a3e5c..236d05ae2 100644 --- a/src/Ryujinx.Memory/Ryujinx.Memory.csproj +++ b/src/Ryujinx.Memory/Ryujinx.Memory.csproj @@ -1,7 +1,6 @@  - net8.0 true diff --git a/src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj b/src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj index 8e7953045..615adf5a8 100644 --- a/src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj +++ b/src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj @@ -1,7 +1,6 @@ - net8.0 diff --git a/src/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj b/src/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj index ab89fb5c7..7a0b3fdc8 100644 --- a/src/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj +++ b/src/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj @@ -1,7 +1,6 @@ - net8.0 Exe Debug;Release diff --git a/src/Ryujinx.Tests.Memory/Ryujinx.Tests.Memory.csproj b/src/Ryujinx.Tests.Memory/Ryujinx.Tests.Memory.csproj index f05060838..b7a652572 100644 --- a/src/Ryujinx.Tests.Memory/Ryujinx.Tests.Memory.csproj +++ b/src/Ryujinx.Tests.Memory/Ryujinx.Tests.Memory.csproj @@ -1,7 +1,6 @@ - net8.0 false diff --git a/src/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj b/src/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj index befacfb22..c0916642a 100644 --- a/src/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj +++ b/src/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj @@ -1,7 +1,6 @@ - net8.0 true Debug;Release diff --git a/src/Ryujinx.Tests/Ryujinx.Tests.csproj b/src/Ryujinx.Tests/Ryujinx.Tests.csproj index 3be9787a3..4d9f33de2 100644 --- a/src/Ryujinx.Tests/Ryujinx.Tests.csproj +++ b/src/Ryujinx.Tests/Ryujinx.Tests.csproj @@ -1,7 +1,6 @@ - net8.0 Exe false diff --git a/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj b/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj index df6532a63..9a0da2853 100644 --- a/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj +++ b/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj @@ -1,7 +1,6 @@ - net8.0 true diff --git a/src/Ryujinx/Ryujinx.csproj b/src/Ryujinx/Ryujinx.csproj index b41ec1cd4..15ca6f1e2 100644 --- a/src/Ryujinx/Ryujinx.csproj +++ b/src/Ryujinx/Ryujinx.csproj @@ -1,6 +1,5 @@ - net8.0 win-x64;osx-x64;linux-x64 Exe true diff --git a/src/Spv.Generator/Spv.Generator.csproj b/src/Spv.Generator/Spv.Generator.csproj index ae2821edb..5adef81ec 100644 --- a/src/Spv.Generator/Spv.Generator.csproj +++ b/src/Spv.Generator/Spv.Generator.csproj @@ -1,7 +1,6 @@  - net8.0 From 4e9d8537e53e03f2693035a9155ef914527cb685 Mon Sep 17 00:00:00 2001 From: Marco Carvalho Date: Wed, 6 Nov 2024 09:16:40 -0300 Subject: [PATCH 2/7] . --- global.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 global.json diff --git a/global.json b/global.json new file mode 100644 index 000000000..b17908025 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "9.0.100-rc.2.24474.11", + "rollForward": "latestFeature" + } +} \ No newline at end of file From 0cb506d666b19a779bf2fe83e9e65adff6fee010 Mon Sep 17 00:00:00 2001 From: Marco Carvalho Date: Wed, 6 Nov 2024 09:21:13 -0300 Subject: [PATCH 3/7] . --- .../Ryujinx.Audio.Backends.OpenAL.csproj | 3 --- src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj | 3 --- src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj | 3 --- src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj | 3 --- src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj | 3 --- src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj | 3 --- src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj | 3 --- src/Ryujinx.Horizon.Common/Ryujinx.Horizon.Common.csproj | 3 --- src/Ryujinx.Horizon/Ryujinx.Horizon.csproj | 3 --- src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj | 3 --- src/Spv.Generator/Spv.Generator.csproj | 3 --- 11 files changed, 33 deletions(-) diff --git a/src/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj b/src/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj index 460c7c08a..4abde3e11 100644 --- a/src/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj +++ b/src/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj @@ -1,8 +1,5 @@ - - - diff --git a/src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj b/src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj index 26f8b8163..f19cbf93c 100644 --- a/src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj +++ b/src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj @@ -1,8 +1,5 @@  - - - diff --git a/src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj b/src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj index 0eca79cb2..42ad917d0 100644 --- a/src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj +++ b/src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj @@ -1,8 +1,5 @@  - - - true diff --git a/src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj b/src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj index 92bd69a23..a32929736 100644 --- a/src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj +++ b/src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj @@ -1,8 +1,5 @@ - - - diff --git a/src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj b/src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj index a240dc2fd..2fe290f35 100644 --- a/src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj +++ b/src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj @@ -1,8 +1,5 @@ - - - diff --git a/src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj b/src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj index a06c0e21a..80b539142 100644 --- a/src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj +++ b/src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj @@ -1,8 +1,5 @@ - - - diff --git a/src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj b/src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj index a429f3ac1..2db9d334c 100644 --- a/src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj +++ b/src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj @@ -1,8 +1,5 @@ - - - true diff --git a/src/Ryujinx.Horizon.Common/Ryujinx.Horizon.Common.csproj b/src/Ryujinx.Horizon.Common/Ryujinx.Horizon.Common.csproj index 7230f7e0c..7cd61249e 100644 --- a/src/Ryujinx.Horizon.Common/Ryujinx.Horizon.Common.csproj +++ b/src/Ryujinx.Horizon.Common/Ryujinx.Horizon.Common.csproj @@ -1,8 +1,5 @@ - - - diff --git a/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj b/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj index 809819273..cad91d4b3 100644 --- a/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj +++ b/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj @@ -1,8 +1,5 @@ - - - diff --git a/src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj b/src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj index 615adf5a8..67772051b 100644 --- a/src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj +++ b/src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj @@ -1,8 +1,5 @@ - - - diff --git a/src/Spv.Generator/Spv.Generator.csproj b/src/Spv.Generator/Spv.Generator.csproj index 5adef81ec..c63216103 100644 --- a/src/Spv.Generator/Spv.Generator.csproj +++ b/src/Spv.Generator/Spv.Generator.csproj @@ -1,6 +1,3 @@  - - - From b90ea27e03f71e52f09a8740cb8f02a6c240d298 Mon Sep 17 00:00:00 2001 From: Marco Carvalho Date: Wed, 6 Nov 2024 09:23:07 -0300 Subject: [PATCH 4/7] . --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7fa78c4b0..9e5308d18 100644 --- a/README.md +++ b/README.md @@ -88,8 +88,8 @@ If you wish to build the emulator yourself, follow these steps: ### Step 1 -Install the [.NET 8.0 (or higher) SDK](https://dotnet.microsoft.com/download/dotnet/8.0). -Make sure your SDK version is higher or equal to the required version specified in [global.json](global.json). +Install the [.NET 9.0 (or higher) SDK](https://dotnet.microsoft.com/download/dotnet/9.0). +Make sure your SDK version is higher or equal to the required version specified in [global.json](global.json). ### Step 2 @@ -118,7 +118,7 @@ This folder is located in the user folder, which can be accessed by clicking `Op It translates the ARM code to a custom IR, performs a few optimizations, and turns that into x86 code. There are three memory manager options available depending on the user's preference, leveraging both software-based (slower) and host-mapped modes (much faster). The fastest option (host, unchecked) is set by default. - Ryujinx also features an optional Profiled Persistent Translation Cache, which essentially caches translated functions so that they do not need to be translated every time the game loads. + Ryujinx also features an optional Profiled Persistent Translation Cache, which essentially caches translated functions so that they do not need to be translated every time the game loads. The net result is a significant reduction in load times (the amount of time between launching a game and arriving at the title screen) for nearly every game. NOTE: This feature is enabled by default in the Options menu > System tab. You must launch the game at least twice to the title screen or beyond before performance improvements are unlocked on the third launch! From 9293cdde819da0fa3f55ead0479fc993b9d1cbb7 Mon Sep 17 00:00:00 2001 From: Marco Carvalho Date: Tue, 12 Nov 2024 15:24:42 -0300 Subject: [PATCH 5/7] Update global.json --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index b17908025..cdbb589ed 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100-rc.2.24474.11", + "version": "9.0.100", "rollForward": "latestFeature" } -} \ No newline at end of file +} From f9ea191ad43df9675bfa51897348c4de53c817ee Mon Sep 17 00:00:00 2001 From: Marco Carvalho Date: Wed, 13 Nov 2024 13:07:36 -0300 Subject: [PATCH 6/7] new Lock object --- src/ARMeilleure/Translation/Cache/JitCache.cs | 3 ++- src/ARMeilleure/Translation/PTC/Ptc.cs | 10 ++++------ src/ARMeilleure/Translation/PTC/PtcProfiler.cs | 4 +--- .../OpenALHardwareDeviceSession.cs | 3 ++- src/Ryujinx.Audio/AudioManager.cs | 2 +- src/Ryujinx.Audio/Backends/Common/DynamicRingBuffer.cs | 3 ++- src/Ryujinx.Audio/Input/AudioInputManager.cs | 2 +- src/Ryujinx.Audio/Output/AudioOutputManager.cs | 2 +- src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs | 2 +- .../Renderer/Server/Upsampler/UpsamplerManager.cs | 3 ++- src/Ryujinx.Common/PreciseSleep/NanosleepPool.cs | 2 +- .../PreciseSleep/WindowsGranularTimer.cs | 2 +- src/Ryujinx.Cpu/AppleHv/HvVm.cs | 3 ++- src/Ryujinx.Cpu/LightningJit/Cache/JitCache.cs | 3 ++- src/Ryujinx.Cpu/LightningJit/Cache/NoWxCache.cs | 4 ++-- src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs | 3 ++- .../Memory/BufferModifiedRangeList.cs | 5 +++-- src/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs | 2 +- .../Queries/CounterQueueEvent.cs | 2 +- src/Ryujinx.Graphics.OpenGL/ResourcePool.cs | 3 ++- src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs | 3 ++- src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs | 2 +- .../Queries/CounterQueueEvent.cs | 2 +- src/Ryujinx.HLE/FileSystem/ContentManager.cs | 3 ++- .../Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs | 3 ++- .../HOS/Applets/SoftwareKeyboard/TimedAction.cs | 2 +- src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs | 5 ++--- src/Ryujinx.HLE/HOS/Kernel/Memory/KCodeMemory.cs | 4 ++-- .../HOS/Kernel/Threading/KCriticalSection.cs | 3 +-- .../HOS/Services/Ldn/Types/NodeLatestUpdate.cs | 3 ++- .../Ldn/UserServiceCreator/LdnMitm/LanDiscovery.cs | 2 +- .../Ldn/UserServiceCreator/LdnRyu/NetworkTimeout.cs | 2 +- .../LdnRyu/Proxy/EphemeralPortPool.cs | 3 ++- src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/BsdContext.cs | 3 ++- .../Services/Sockets/Bsd/Impl/EventFileDescriptor.cs | 2 +- .../HOS/Services/Ssl/BuiltInCertificateManager.cs | 3 ++- .../Services/SurfaceFlinger/HOSBinderDriverServer.cs | 3 ++- .../HOS/Services/SurfaceFlinger/SurfaceFlinger.cs | 2 +- .../HOS/Services/Time/TimeZone/TimeZoneManager.cs | 3 ++- .../Sdk/Friends/Detail/Ipc/NotificationService.cs | 3 ++- src/Ryujinx.Horizon/Sdk/Ngc/Detail/ContentsReader.cs | 4 ++-- src/Ryujinx.Horizon/Sdk/OsTypes/Impl/MultiWaitImpl.cs | 3 ++- src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs | 3 ++- src/Ryujinx.Input/HLE/NpadManager.cs | 3 ++- src/Ryujinx.SDL2.Common/SDL2Driver.cs | 2 +- src/Ryujinx/AppHost.cs | 6 +++--- 46 files changed, 78 insertions(+), 62 deletions(-) diff --git a/src/ARMeilleure/Translation/Cache/JitCache.cs b/src/ARMeilleure/Translation/Cache/JitCache.cs index cf13cd6cb..3bbec482c 100644 --- a/src/ARMeilleure/Translation/Cache/JitCache.cs +++ b/src/ARMeilleure/Translation/Cache/JitCache.cs @@ -8,6 +8,7 @@ using System.Diagnostics; using System.Runtime.InteropServices; using System.Runtime.Versioning; +using System.Threading; namespace ARMeilleure.Translation.Cache { @@ -26,7 +27,7 @@ static partial class JitCache private static readonly List _cacheEntries = new(); - private static readonly object _lock = new(); + private static readonly Lock _lock = new(); private static bool _initialized; [SupportedOSPlatform("windows")] diff --git a/src/ARMeilleure/Translation/PTC/Ptc.cs b/src/ARMeilleure/Translation/PTC/Ptc.cs index 8236150fe..b54b917c0 100644 --- a/src/ARMeilleure/Translation/PTC/Ptc.cs +++ b/src/ARMeilleure/Translation/PTC/Ptc.cs @@ -58,7 +58,7 @@ class Ptc : IPtcLoadState private readonly ManualResetEvent _waitEvent; - private readonly object _lock; + private readonly Lock _lock = new(); private bool _disposed; @@ -88,8 +88,6 @@ public Ptc() _waitEvent = new ManualResetEvent(true); - _lock = new object(); - _disposed = false; TitleIdText = TitleIdTextDefault; @@ -851,11 +849,11 @@ void TranslateFuncs() List threads = Enumerable.Range(0, degreeOfParallelism) - .Select(idx => + .Select(idx => new Thread(TranslateFuncs) { - IsBackground = true, - Name = "Ptc.TranslateThread." + idx + IsBackground = true, + Name = "Ptc.TranslateThread." + idx } ).ToList(); diff --git a/src/ARMeilleure/Translation/PTC/PtcProfiler.cs b/src/ARMeilleure/Translation/PTC/PtcProfiler.cs index 8e95c5e4b..7e630ae10 100644 --- a/src/ARMeilleure/Translation/PTC/PtcProfiler.cs +++ b/src/ARMeilleure/Translation/PTC/PtcProfiler.cs @@ -41,7 +41,7 @@ class PtcProfiler private readonly ManualResetEvent _waitEvent; - private readonly object _lock; + private readonly Lock _lock = new(); private bool _disposed; @@ -65,8 +65,6 @@ public PtcProfiler(Ptc ptc) _waitEvent = new ManualResetEvent(true); - _lock = new object(); - _disposed = false; ProfiledFuncs = new Dictionary(); diff --git a/src/Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs b/src/Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs index 3b9129130..7292450a6 100644 --- a/src/Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs +++ b/src/Ryujinx.Audio.Backends.OpenAL/OpenALHardwareDeviceSession.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Threading; namespace Ryujinx.Audio.Backends.OpenAL { @@ -18,7 +19,7 @@ class OpenALHardwareDeviceSession : HardwareDeviceSessionOutputBase private ulong _playedSampleCount; private float _volume; - private readonly object _lock = new(); + private readonly Lock _lock = new(); public OpenALHardwareDeviceSession(OpenALHardwareDeviceDriver driver, IVirtualMemoryManager memoryManager, SampleFormat requestedSampleFormat, uint requestedSampleRate, uint requestedChannelCount) : base(memoryManager, requestedSampleFormat, requestedSampleRate, requestedChannelCount) { diff --git a/src/Ryujinx.Audio/AudioManager.cs b/src/Ryujinx.Audio/AudioManager.cs index 370d3d098..8c2c0ef6b 100644 --- a/src/Ryujinx.Audio/AudioManager.cs +++ b/src/Ryujinx.Audio/AudioManager.cs @@ -11,7 +11,7 @@ public class AudioManager : IDisposable /// /// Lock used to control the waiters registration. /// - private readonly object _lock = new(); + private readonly Lock _lock = new(); /// /// Events signaled when the driver played audio buffers. diff --git a/src/Ryujinx.Audio/Backends/Common/DynamicRingBuffer.cs b/src/Ryujinx.Audio/Backends/Common/DynamicRingBuffer.cs index 7aefe8865..6f31755a3 100644 --- a/src/Ryujinx.Audio/Backends/Common/DynamicRingBuffer.cs +++ b/src/Ryujinx.Audio/Backends/Common/DynamicRingBuffer.cs @@ -2,6 +2,7 @@ using Ryujinx.Common.Memory; using System; using System.Buffers; +using System.Threading; namespace Ryujinx.Audio.Backends.Common { @@ -12,7 +13,7 @@ public class DynamicRingBuffer { private const int RingBufferAlignment = 2048; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private MemoryOwner _bufferOwner; private Memory _buffer; diff --git a/src/Ryujinx.Audio/Input/AudioInputManager.cs b/src/Ryujinx.Audio/Input/AudioInputManager.cs index d56997e9c..4f948673c 100644 --- a/src/Ryujinx.Audio/Input/AudioInputManager.cs +++ b/src/Ryujinx.Audio/Input/AudioInputManager.cs @@ -14,7 +14,7 @@ namespace Ryujinx.Audio.Input /// public class AudioInputManager : IDisposable { - private readonly object _lock = new(); + private readonly Lock _lock = new(); /// /// Lock used for session allocation. diff --git a/src/Ryujinx.Audio/Output/AudioOutputManager.cs b/src/Ryujinx.Audio/Output/AudioOutputManager.cs index 308cd1564..4ba3fa111 100644 --- a/src/Ryujinx.Audio/Output/AudioOutputManager.cs +++ b/src/Ryujinx.Audio/Output/AudioOutputManager.cs @@ -14,7 +14,7 @@ namespace Ryujinx.Audio.Output /// public class AudioOutputManager : IDisposable { - private readonly object _lock = new(); + private readonly Lock _lock = new(); /// /// Lock used for session allocation. diff --git a/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs b/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs index 246889c48..65a134af1 100644 --- a/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs +++ b/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs @@ -26,7 +26,7 @@ namespace Ryujinx.Audio.Renderer.Server { public class AudioRenderSystem : IDisposable { - private readonly object _lock = new(); + private readonly Lock _lock = new(); private AudioRendererRenderingDevice _renderingDevice; private AudioRendererExecutionMode _executionMode; diff --git a/src/Ryujinx.Audio/Renderer/Server/Upsampler/UpsamplerManager.cs b/src/Ryujinx.Audio/Renderer/Server/Upsampler/UpsamplerManager.cs index dbc2c9b3f..8b3f39439 100644 --- a/src/Ryujinx.Audio/Renderer/Server/Upsampler/UpsamplerManager.cs +++ b/src/Ryujinx.Audio/Renderer/Server/Upsampler/UpsamplerManager.cs @@ -1,5 +1,6 @@ using System; using System.Diagnostics; +using System.Threading; namespace Ryujinx.Audio.Renderer.Server.Upsampler { @@ -16,7 +17,7 @@ public class UpsamplerManager /// /// Global lock of the object. /// - private readonly object _lock = new(); + private readonly Lock _lock = new(); /// /// The upsamplers instances. diff --git a/src/Ryujinx.Common/PreciseSleep/NanosleepPool.cs b/src/Ryujinx.Common/PreciseSleep/NanosleepPool.cs index c0973dcb3..45b8e95fa 100644 --- a/src/Ryujinx.Common/PreciseSleep/NanosleepPool.cs +++ b/src/Ryujinx.Common/PreciseSleep/NanosleepPool.cs @@ -124,7 +124,7 @@ public void Dispose() } } - private readonly object _lock = new(); + private readonly Lock _lock = new(); private readonly List _threads = new(); private readonly List _active = new(); private readonly Stack _free = new(); diff --git a/src/Ryujinx.Common/PreciseSleep/WindowsGranularTimer.cs b/src/Ryujinx.Common/PreciseSleep/WindowsGranularTimer.cs index 3bf092704..cef4dc927 100644 --- a/src/Ryujinx.Common/PreciseSleep/WindowsGranularTimer.cs +++ b/src/Ryujinx.Common/PreciseSleep/WindowsGranularTimer.cs @@ -50,7 +50,7 @@ public WaitingObject(long id, EventWaitHandle signal, long timePoint) private long _lastTicks = PerformanceCounter.ElapsedTicks; private long _lastId; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private readonly List _waitingObjects = new(); private WindowsGranularTimer() diff --git a/src/Ryujinx.Cpu/AppleHv/HvVm.cs b/src/Ryujinx.Cpu/AppleHv/HvVm.cs index a12bbea9b..b4d45f36d 100644 --- a/src/Ryujinx.Cpu/AppleHv/HvVm.cs +++ b/src/Ryujinx.Cpu/AppleHv/HvVm.cs @@ -1,6 +1,7 @@ using Ryujinx.Memory; using System; using System.Runtime.Versioning; +using System.Threading; namespace Ryujinx.Cpu.AppleHv { @@ -12,7 +13,7 @@ static class HvVm private static int _addressSpaces; private static HvIpaAllocator _ipaAllocator; - private static readonly object _lock = new(); + private static readonly Lock _lock = new(); public static (ulong, HvIpaAllocator) CreateAddressSpace(MemoryBlock block) { diff --git a/src/Ryujinx.Cpu/LightningJit/Cache/JitCache.cs b/src/Ryujinx.Cpu/LightningJit/Cache/JitCache.cs index ac1274bf6..10ae050b6 100644 --- a/src/Ryujinx.Cpu/LightningJit/Cache/JitCache.cs +++ b/src/Ryujinx.Cpu/LightningJit/Cache/JitCache.cs @@ -5,6 +5,7 @@ using System.Diagnostics; using System.Runtime.InteropServices; using System.Runtime.Versioning; +using System.Threading; namespace Ryujinx.Cpu.LightningJit.Cache { @@ -23,7 +24,7 @@ static partial class JitCache private static readonly List _cacheEntries = new(); - private static readonly object _lock = new(); + private static readonly Lock _lock = new(); private static bool _initialized; [SupportedOSPlatform("windows")] diff --git a/src/Ryujinx.Cpu/LightningJit/Cache/NoWxCache.cs b/src/Ryujinx.Cpu/LightningJit/Cache/NoWxCache.cs index 3cf279ae3..e9a342aba 100644 --- a/src/Ryujinx.Cpu/LightningJit/Cache/NoWxCache.cs +++ b/src/Ryujinx.Cpu/LightningJit/Cache/NoWxCache.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Threading; namespace Ryujinx.Cpu.LightningJit.Cache { @@ -104,7 +105,7 @@ public void Dispose() private readonly MemoryCache _sharedCache; private readonly MemoryCache _localCache; private readonly PageAlignedRangeList _pendingMap; - private readonly object _lock; + private readonly Lock _lock = new(); class ThreadLocalCacheEntry { @@ -137,7 +138,6 @@ public NoWxCache(IJitMemoryAllocator allocator, IStackWalker stackWalker, Transl _sharedCache = new(allocator, SharedCacheSize); _localCache = new(allocator, LocalCacheSize); _pendingMap = new(_sharedCache.ReprotectAsRx, RegisterFunction); - _lock = new(); } public unsafe nint Map(nint framePointer, ReadOnlySpan code, ulong guestAddress, ulong guestSize) diff --git a/src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs b/src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs index 2985f1c21..75a6d3bf8 100644 --- a/src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs +++ b/src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs @@ -5,6 +5,7 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Threading; namespace Ryujinx.Cpu.Signal { @@ -59,7 +60,7 @@ static class NativeSignalHandler private static MemoryBlock _codeBlock; - private static readonly object _lock = new(); + private static readonly Lock _lock = new(); private static bool _initialized; static NativeSignalHandler() diff --git a/src/Ryujinx.Graphics.Gpu/Memory/BufferModifiedRangeList.cs b/src/Ryujinx.Graphics.Gpu/Memory/BufferModifiedRangeList.cs index d330de638..c5a12c1fc 100644 --- a/src/Ryujinx.Graphics.Gpu/Memory/BufferModifiedRangeList.cs +++ b/src/Ryujinx.Graphics.Gpu/Memory/BufferModifiedRangeList.cs @@ -2,6 +2,7 @@ using Ryujinx.Memory.Range; using System; using System.Linq; +using System.Threading; namespace Ryujinx.Graphics.Gpu.Memory { @@ -76,7 +77,7 @@ class BufferModifiedRangeList : RangeList private BufferMigration _source; private BufferModifiedRangeList _migrationTarget; - private readonly object _lock = new(); + private readonly Lock _lock = new(); /// /// Whether the modified range list has any entries or not. @@ -435,7 +436,7 @@ public void InheritRanges(BufferModifiedRangeList ranges, Action r if (_source == null) { - // Create a new migration. + // Create a new migration. _source = new BufferMigration(new BufferMigrationSpan[] { span }, this, _context.SyncNumber); _context.RegisterBufferMigration(_source); diff --git a/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs b/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs index 345a99ffa..7e0311407 100644 --- a/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs +++ b/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs @@ -19,7 +19,7 @@ class CounterQueue : IDisposable private ulong _accumulatedCounter; private int _waiterCount; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private readonly Queue _queryPool; private readonly AutoResetEvent _queuedEvent = new(false); diff --git a/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueueEvent.cs b/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueueEvent.cs index 32b75c615..889517480 100644 --- a/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueueEvent.cs +++ b/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueueEvent.cs @@ -24,7 +24,7 @@ class CounterQueueEvent : ICounterEvent private bool _hostAccessReserved = false; private int _refCount = 1; // Starts with a reference from the counter queue. - private readonly object _lock = new(); + private readonly Lock _lock = new(); private ulong _result = ulong.MaxValue; private double _divisor = 1f; diff --git a/src/Ryujinx.Graphics.OpenGL/ResourcePool.cs b/src/Ryujinx.Graphics.OpenGL/ResourcePool.cs index 6385f57b5..c8ff30a07 100644 --- a/src/Ryujinx.Graphics.OpenGL/ResourcePool.cs +++ b/src/Ryujinx.Graphics.OpenGL/ResourcePool.cs @@ -2,6 +2,7 @@ using Ryujinx.Graphics.OpenGL.Image; using System; using System.Collections.Generic; +using System.Threading; namespace Ryujinx.Graphics.OpenGL { @@ -19,7 +20,7 @@ class ResourcePool : IDisposable { private const int DisposedLiveFrames = 2; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private readonly Dictionary> _textures = new(); /// diff --git a/src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs b/src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs index 77c5f95c9..5c8b2a761 100644 --- a/src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs +++ b/src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs @@ -5,6 +5,7 @@ using Silk.NET.Vulkan.Extensions.EXT; using System; using System.Collections.Generic; +using System.Threading; namespace Ryujinx.Graphics.Vulkan { @@ -31,7 +32,7 @@ public HostMemoryAllocation(Auto allocation, nint pointer, ulo private readonly Vk _api; private readonly ExtExternalMemoryHost _hostMemoryApi; private readonly Device _device; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private readonly List _allocations; private readonly IntervalTree _allocationTree; diff --git a/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs b/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs index 0d133e50e..fa10f13b9 100644 --- a/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs +++ b/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs @@ -24,7 +24,7 @@ class CounterQueue : IDisposable private ulong _accumulatedCounter; private int _waiterCount; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private readonly Queue _queryPool; private readonly AutoResetEvent _queuedEvent = new(false); diff --git a/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs b/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs index 14d3050bf..0bac3be12 100644 --- a/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs +++ b/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs @@ -22,7 +22,7 @@ class CounterQueueEvent : ICounterEvent private bool _hostAccessReserved; private int _refCount = 1; // Starts with a reference from the counter queue. - private readonly object _lock = new(); + private readonly Lock _lock = new(); private ulong _result = ulong.MaxValue; private double _divisor = 1f; diff --git a/src/Ryujinx.HLE/FileSystem/ContentManager.cs b/src/Ryujinx.HLE/FileSystem/ContentManager.cs index fc8def9d2..b23598247 100644 --- a/src/Ryujinx.HLE/FileSystem/ContentManager.cs +++ b/src/Ryujinx.HLE/FileSystem/ContentManager.cs @@ -21,6 +21,7 @@ using System.IO.Compression; using System.Linq; using System.Text; +using System.Threading; using Path = System.IO.Path; namespace Ryujinx.HLE.FileSystem @@ -54,7 +55,7 @@ public AocItem(string containerPath, string ncaPath) private readonly VirtualFileSystem _virtualFileSystem; - private readonly object _lock = new(); + private readonly Lock _lock = new(); public ContentManager(VirtualFileSystem virtualFileSystem) { diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs index e04fc64fe..9e129f0d2 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs +++ b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs @@ -14,6 +14,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; +using System.Threading; namespace Ryujinx.HLE.HOS.Applets { @@ -62,7 +63,7 @@ internal class SoftwareKeyboardApplet : IApplet private bool _canAcceptController = false; private KeyboardInputMode _inputMode = KeyboardInputMode.ControllerAndKeyboard; - private readonly object _lock = new(); + private readonly Lock _lock = new(); public event EventHandler AppletStateChanged; diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/TimedAction.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/TimedAction.cs index 3eaf64596..a8b137df2 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/TimedAction.cs +++ b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/TimedAction.cs @@ -27,7 +27,7 @@ public SleepSubstepData(int sleepMilliseconds) private TRef _cancelled = null; private Thread _thread = null; - private readonly object _lock = new(); + private readonly Lock _lock = new(); public bool IsRunning { diff --git a/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs b/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs index 3f16f8c24..ce2b7185a 100644 --- a/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs +++ b/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs @@ -2,6 +2,7 @@ using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.Horizon.Common; using System.Collections.Generic; +using System.Threading; namespace Ryujinx.HLE.HOS.Kernel.Common { @@ -14,7 +15,7 @@ class KResourceLimit : KAutoObject private readonly long[] _current2; private readonly long[] _peak; - private readonly object _lock; + private readonly Lock _lock = new(); private readonly LinkedList _waitingThreads; @@ -27,8 +28,6 @@ public KResourceLimit(KernelContext context) : base(context) _current2 = new long[(int)LimitableResource.Count]; _peak = new long[(int)LimitableResource.Count]; - _lock = new object(); - _waitingThreads = new LinkedList(); } diff --git a/src/Ryujinx.HLE/HOS/Kernel/Memory/KCodeMemory.cs b/src/Ryujinx.HLE/HOS/Kernel/Memory/KCodeMemory.cs index c725501b0..e6d96d803 100644 --- a/src/Ryujinx.HLE/HOS/Kernel/Memory/KCodeMemory.cs +++ b/src/Ryujinx.HLE/HOS/Kernel/Memory/KCodeMemory.cs @@ -4,6 +4,7 @@ using Ryujinx.Horizon.Common; using System; using System.Diagnostics; +using System.Threading; namespace Ryujinx.HLE.HOS.Kernel.Memory { @@ -11,7 +12,7 @@ class KCodeMemory : KAutoObject { public KProcess Owner { get; private set; } private readonly KPageList _pageList; - private readonly object _lock; + private readonly Lock _lock = new(); private ulong _address; private bool _isOwnerMapped; private bool _isMapped; @@ -19,7 +20,6 @@ class KCodeMemory : KAutoObject public KCodeMemory(KernelContext context) : base(context) { _pageList = new KPageList(); - _lock = new object(); } public Result Initialize(ulong address, ulong size) diff --git a/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs b/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs index 3d6744882..5a7b9cbaf 100644 --- a/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs +++ b/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs @@ -5,7 +5,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading class KCriticalSection { private readonly KernelContext _context; - private readonly object _lock; + private readonly Lock _lock = new(); private int _recursionCount; public object Lock => _lock; @@ -13,7 +13,6 @@ class KCriticalSection public KCriticalSection(KernelContext context) { _context = context; - _lock = new object(); } public void Enter() diff --git a/src/Ryujinx.HLE/HOS/Services/Ldn/Types/NodeLatestUpdate.cs b/src/Ryujinx.HLE/HOS/Services/Ldn/Types/NodeLatestUpdate.cs index 0461e783e..826a50458 100644 --- a/src/Ryujinx.HLE/HOS/Services/Ldn/Types/NodeLatestUpdate.cs +++ b/src/Ryujinx.HLE/HOS/Services/Ldn/Types/NodeLatestUpdate.cs @@ -1,5 +1,6 @@ using Ryujinx.Common.Memory; using System.Runtime.InteropServices; +using System.Threading; namespace Ryujinx.HLE.HOS.Services.Ldn.Types { @@ -12,7 +13,7 @@ struct NodeLatestUpdate static class NodeLatestUpdateHelper { - private static readonly object _lock = new(); + private static readonly Lock _lock = new(); public static void CalculateLatestUpdate(this Array8 array, Array8 beforeNodes, Array8 afterNodes) { diff --git a/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnMitm/LanDiscovery.cs b/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnMitm/LanDiscovery.cs index b5f643d23..8b7af42a0 100644 --- a/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnMitm/LanDiscovery.cs +++ b/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnMitm/LanDiscovery.cs @@ -29,7 +29,7 @@ internal class LanDiscovery : IDisposable private ILdnTcpSocket _tcp; private LdnProxyUdpServer _udp, _udp2; private readonly List _stations = new(); - private readonly object _lock = new(); + private readonly Lock _lock = new(); private readonly AutoResetEvent _apConnected = new(false); diff --git a/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnRyu/NetworkTimeout.cs b/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnRyu/NetworkTimeout.cs index 5012d5d81..f7a9d77a4 100644 --- a/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnRyu/NetworkTimeout.cs +++ b/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnRyu/NetworkTimeout.cs @@ -10,7 +10,7 @@ class NetworkTimeout : IDisposable private readonly Action _timeoutCallback; private CancellationTokenSource _cancel; - private readonly object _lock = new object(); + private readonly Lock _lock = new(); public NetworkTimeout(int idleTimeout, Action timeoutCallback) { diff --git a/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnRyu/Proxy/EphemeralPortPool.cs b/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnRyu/Proxy/EphemeralPortPool.cs index bc3a5edf2..9ea56d050 100644 --- a/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnRyu/Proxy/EphemeralPortPool.cs +++ b/src/Ryujinx.HLE/HOS/Services/Ldn/UserServiceCreator/LdnRyu/Proxy/EphemeralPortPool.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Threading; namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy { @@ -8,7 +9,7 @@ public class EphemeralPortPool private readonly List _ephemeralPorts = new List(); - private readonly object _lock = new object(); + private readonly Lock _lock = new(); public ushort Get() { diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/BsdContext.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/BsdContext.cs index 7ecd6835d..9d5bb8d01 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/BsdContext.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/BsdContext.cs @@ -3,6 +3,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Numerics; +using System.Threading; namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd { @@ -10,7 +11,7 @@ class BsdContext { private static readonly ConcurrentDictionary _registry = new(); - private readonly object _lock = new(); + private readonly Lock _lock = new(); private readonly List _fds; diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs index 5b9e6811d..63a8e8c97 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs @@ -10,7 +10,7 @@ class EventFileDescriptor : IFileDescriptor private ulong _value; private readonly EventFdFlags _flags; - private readonly object _lock = new(); + private readonly Lock _lock = new(); public bool Blocking { get => !_flags.HasFlag(EventFdFlags.NonBlocking); set => throw new NotSupportedException(); } diff --git a/src/Ryujinx.HLE/HOS/Services/Ssl/BuiltInCertificateManager.cs b/src/Ryujinx.HLE/HOS/Services/Ssl/BuiltInCertificateManager.cs index 49becac55..622b62c16 100644 --- a/src/Ryujinx.HLE/HOS/Services/Ssl/BuiltInCertificateManager.cs +++ b/src/Ryujinx.HLE/HOS/Services/Ssl/BuiltInCertificateManager.cs @@ -16,6 +16,7 @@ using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Threading; namespace Ryujinx.HLE.HOS.Services.Ssl { @@ -43,7 +44,7 @@ public static BuiltInCertificateManager Instance private bool _initialized; private Dictionary _certificates; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private struct CertStoreFileHeader { diff --git a/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/HOSBinderDriverServer.cs b/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/HOSBinderDriverServer.cs index bc7bffcb6..5151930a5 100644 --- a/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/HOSBinderDriverServer.cs +++ b/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/HOSBinderDriverServer.cs @@ -2,6 +2,7 @@ using Ryujinx.HLE.HOS.Kernel.Threading; using System; using System.Collections.Generic; +using System.Threading; namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger { @@ -11,7 +12,7 @@ class HOSBinderDriverServer : IHOSBinderDriver private static int _lastBinderId = 0; - private static readonly object _lock = new(); + private static readonly Lock _lock = new(); public static int RegisterBinderObject(IBinder binder) { diff --git a/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs b/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs index 4c17e7aed..c83069756 100644 --- a/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs +++ b/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs @@ -35,7 +35,7 @@ class SurfaceFlinger : IConsumerListener, IDisposable private int _swapInterval; private int _swapIntervalDelay; - private readonly object _lock = new(); + private readonly Lock _lock = new(); public long RenderLayerId { get; private set; } diff --git a/src/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneManager.cs b/src/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneManager.cs index 3b57b1805..155733d2e 100644 --- a/src/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneManager.cs +++ b/src/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneManager.cs @@ -2,6 +2,7 @@ using Ryujinx.HLE.HOS.Services.Time.Clock; using System; using System.IO; +using System.Threading; namespace Ryujinx.HLE.HOS.Services.Time.TimeZone { @@ -13,7 +14,7 @@ class TimeZoneManager private UInt128 _timeZoneRuleVersion; private uint _totalLocationNameCount; private SteadyClockTimePoint _timeZoneUpdateTimePoint; - private readonly object _lock = new(); + private readonly Lock _lock = new(); public TimeZoneManager() { diff --git a/src/Ryujinx.Horizon/Sdk/Friends/Detail/Ipc/NotificationService.cs b/src/Ryujinx.Horizon/Sdk/Friends/Detail/Ipc/NotificationService.cs index 534bf63ed..585b40df3 100644 --- a/src/Ryujinx.Horizon/Sdk/Friends/Detail/Ipc/NotificationService.cs +++ b/src/Ryujinx.Horizon/Sdk/Friends/Detail/Ipc/NotificationService.cs @@ -4,6 +4,7 @@ using Ryujinx.Horizon.Sdk.Sf; using System; using System.Collections.Generic; +using System.Threading; namespace Ryujinx.Horizon.Sdk.Friends.Detail.Ipc { @@ -13,7 +14,7 @@ partial class NotificationService : INotificationService, IDisposable private readonly Uid _userId; private readonly FriendsServicePermissionLevel _permissionLevel; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private SystemEventType _notificationEvent; diff --git a/src/Ryujinx.Horizon/Sdk/Ngc/Detail/ContentsReader.cs b/src/Ryujinx.Horizon/Sdk/Ngc/Detail/ContentsReader.cs index 6a0fc4f9e..d3ed37e78 100644 --- a/src/Ryujinx.Horizon/Sdk/Ngc/Detail/ContentsReader.cs +++ b/src/Ryujinx.Horizon/Sdk/Ngc/Detail/ContentsReader.cs @@ -3,6 +3,7 @@ using System; using System.IO; using System.IO.Compression; +using System.Threading; namespace Ryujinx.Horizon.Sdk.Ngc.Detail { @@ -22,13 +23,12 @@ private enum AcType } private readonly IFsClient _fsClient; - private readonly object _lock; + private readonly Lock _lock = new(); private bool _intialized; private ulong _cacheSize; public ContentsReader(IFsClient fsClient) { - _lock = new(); _fsClient = fsClient; } diff --git a/src/Ryujinx.Horizon/Sdk/OsTypes/Impl/MultiWaitImpl.cs b/src/Ryujinx.Horizon/Sdk/OsTypes/Impl/MultiWaitImpl.cs index 406352003..879a3a58f 100644 --- a/src/Ryujinx.Horizon/Sdk/OsTypes/Impl/MultiWaitImpl.cs +++ b/src/Ryujinx.Horizon/Sdk/OsTypes/Impl/MultiWaitImpl.cs @@ -2,6 +2,7 @@ using Ryujinx.Horizon.Common; using System; using System.Collections.Generic; +using System.Threading; namespace Ryujinx.Horizon.Sdk.OsTypes.Impl { @@ -13,7 +14,7 @@ class MultiWaitImpl private readonly List _multiWaits; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private int _waitingThreadHandle; diff --git a/src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs b/src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs index 0acbaaa19..a023e4b0e 100644 --- a/src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs +++ b/src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs @@ -1,6 +1,7 @@ using Ryujinx.SDL2.Common; using System; using System.Collections.Generic; +using System.Threading; using static SDL2.SDL; namespace Ryujinx.Input.SDL2 @@ -9,7 +10,7 @@ public class SDL2GamepadDriver : IGamepadDriver { private readonly Dictionary _gamepadsInstanceIdsMapping; private readonly List _gamepadsIds; - private readonly object _lock = new(); + private readonly Lock _lock = new(); public ReadOnlySpan GamepadsIds { diff --git a/src/Ryujinx.Input/HLE/NpadManager.cs b/src/Ryujinx.Input/HLE/NpadManager.cs index 1dc87358d..a77aa2168 100644 --- a/src/Ryujinx.Input/HLE/NpadManager.cs +++ b/src/Ryujinx.Input/HLE/NpadManager.cs @@ -7,6 +7,7 @@ using System.Diagnostics; using System.Linq; using System.Runtime.CompilerServices; +using System.Threading; using CemuHookClient = Ryujinx.Input.Motion.CemuHook.Client; using ControllerType = Ryujinx.Common.Configuration.Hid.ControllerType; using PlayerIndex = Ryujinx.HLE.HOS.Services.Hid.PlayerIndex; @@ -18,7 +19,7 @@ public class NpadManager : IDisposable { private readonly CemuHookClient _cemuHookClient; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private bool _blockInputUpdates; diff --git a/src/Ryujinx.SDL2.Common/SDL2Driver.cs b/src/Ryujinx.SDL2.Common/SDL2Driver.cs index 4d8961335..851c07867 100644 --- a/src/Ryujinx.SDL2.Common/SDL2Driver.cs +++ b/src/Ryujinx.SDL2.Common/SDL2Driver.cs @@ -36,7 +36,7 @@ public static SDL2Driver Instance private ConcurrentDictionary> _registeredWindowHandlers; - private readonly object _lock = new(); + private readonly Lock _lock = new(); private SDL2Driver() { } diff --git a/src/Ryujinx/AppHost.cs b/src/Ryujinx/AppHost.cs index 7246be4b9..2f5e0e20e 100644 --- a/src/Ryujinx/AppHost.cs +++ b/src/Ryujinx/AppHost.cs @@ -120,7 +120,7 @@ private enum CursorStates private bool _dialogShown; private readonly bool _isFirmwareTitle; - private readonly object _lockObject = new(); + private readonly Lock _lockObject = new(); public event EventHandler AppExit; public event EventHandler StatusUpdatedEvent; @@ -625,13 +625,13 @@ public async Task LoadGuestApplication() if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime) { if (!SetupValidator.CanStartApplication(ContentManager, ApplicationPath, out UserError userError)) - { + { if (SetupValidator.CanFixStartApplication(ContentManager, ApplicationPath, userError, out firmwareVersion)) { if (userError is UserError.NoFirmware) { UserResult result = await ContentDialogHelper.CreateConfirmationDialog( - LocaleManager.Instance[LocaleKeys.DialogFirmwareNoFirmwareInstalledMessage], + LocaleManager.Instance[LocaleKeys.DialogFirmwareNoFirmwareInstalledMessage], LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogFirmwareInstallEmbeddedMessage, firmwareVersion.VersionString), LocaleManager.Instance[LocaleKeys.InputDialogYes], LocaleManager.Instance[LocaleKeys.InputDialogNo], From f1814e5c0ea7ff3e8211eabda6f172246e817ecc Mon Sep 17 00:00:00 2001 From: Marco Carvalho Date: Wed, 13 Nov 2024 13:52:38 -0300 Subject: [PATCH 7/7] fix CS9216 --- src/Ryujinx.Audio/Input/AudioInputSystem.cs | 4 ++-- src/Ryujinx.Audio/Output/AudioOutputSystem.cs | 4 ++-- src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs | 2 +- src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs | 2 +- .../HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Ryujinx.Audio/Input/AudioInputSystem.cs b/src/Ryujinx.Audio/Input/AudioInputSystem.cs index 34623b34f..65b99745d 100644 --- a/src/Ryujinx.Audio/Input/AudioInputSystem.cs +++ b/src/Ryujinx.Audio/Input/AudioInputSystem.cs @@ -48,7 +48,7 @@ public class AudioInputSystem : IDisposable /// /// The lock of the parent. /// - private readonly object _parentLock; + private readonly Lock _parentLock; /// /// The dispose state. @@ -62,7 +62,7 @@ public class AudioInputSystem : IDisposable /// The lock of the manager /// The hardware device session /// The buffer release event of the audio input - public AudioInputSystem(AudioInputManager manager, object parentLock, IHardwareDeviceSession deviceSession, IWritableEvent bufferEvent) + public AudioInputSystem(AudioInputManager manager, Lock parentLock, IHardwareDeviceSession deviceSession, IWritableEvent bufferEvent) { _manager = manager; _parentLock = parentLock; diff --git a/src/Ryujinx.Audio/Output/AudioOutputSystem.cs b/src/Ryujinx.Audio/Output/AudioOutputSystem.cs index f9b9bdcf1..dc7d52ced 100644 --- a/src/Ryujinx.Audio/Output/AudioOutputSystem.cs +++ b/src/Ryujinx.Audio/Output/AudioOutputSystem.cs @@ -48,7 +48,7 @@ public class AudioOutputSystem : IDisposable /// /// THe lock of the parent. /// - private readonly object _parentLock; + private readonly Lock _parentLock; /// /// The dispose state. @@ -62,7 +62,7 @@ public class AudioOutputSystem : IDisposable /// The lock of the manager /// The hardware device session /// The buffer release event of the audio output - public AudioOutputSystem(AudioOutputManager manager, object parentLock, IHardwareDeviceSession deviceSession, IWritableEvent bufferEvent) + public AudioOutputSystem(AudioOutputManager manager, Lock parentLock, IHardwareDeviceSession deviceSession, IWritableEvent bufferEvent) { _manager = manager; _parentLock = parentLock; diff --git a/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs b/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs index ce2b7185a..90231b460 100644 --- a/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs +++ b/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs @@ -15,7 +15,7 @@ class KResourceLimit : KAutoObject private readonly long[] _current2; private readonly long[] _peak; - private readonly Lock _lock = new(); + private readonly object _lock = new(); private readonly LinkedList _waitingThreads; diff --git a/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs b/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs index 5a7b9cbaf..bfa6b68f6 100644 --- a/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs +++ b/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs @@ -5,7 +5,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading class KCriticalSection { private readonly KernelContext _context; - private readonly Lock _lock = new(); + private readonly object _lock = new(); private int _recursionCount; public object Lock => _lock; diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs index 63a8e8c97..5b9e6811d 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs @@ -10,7 +10,7 @@ class EventFileDescriptor : IFileDescriptor private ulong _value; private readonly EventFdFlags _flags; - private readonly Lock _lock = new(); + private readonly object _lock = new(); public bool Blocking { get => !_flags.HasFlag(EventFdFlags.NonBlocking); set => throw new NotSupportedException(); }