diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000000..67b2324e3b --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,5 @@ + + + net9.0 + + diff --git a/README.md b/README.md index f6783b4124..5089fd59d7 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ failing to meet this requirement may result in a poor gameplay experience or une ## Latest build -Stable builds are made every so often onto a separate "release" branch that then gets put into the releases you know and love. +Stable builds are made every so often onto a separate "release" branch that then gets put into the releases you know and love. These stable builds exist so that the end user can get a more **enjoyable and stable experience**. You can find the latest stable release [here](https://github.com/GreemDev/Ryujinx/releases/latest). @@ -91,7 +91,7 @@ If you are planning to contribute or just want to learn more about this project 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! diff --git a/global.json b/global.json index 391ba3c2a3..cdbb589eda 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "9.0.100", "rollForward": "latestFeature" } } diff --git a/src/ARMeilleure/ARMeilleure.csproj b/src/ARMeilleure/ARMeilleure.csproj index 4b67fdb3bb..5b6c5a6dac 100644 --- a/src/ARMeilleure/ARMeilleure.csproj +++ b/src/ARMeilleure/ARMeilleure.csproj @@ -1,7 +1,6 @@ - net8.0 true $(DefaultItemExcludes);._* diff --git a/src/ARMeilleure/Translation/Cache/JitCache.cs b/src/ARMeilleure/Translation/Cache/JitCache.cs index cf13cd6cb7..3bbec482c6 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 841e5fefa3..4675abc49f 100644 --- a/src/ARMeilleure/Translation/PTC/Ptc.cs +++ b/src/ARMeilleure/Translation/PTC/Ptc.cs @@ -59,7 +59,7 @@ class Ptc : IPtcLoadState private readonly ManualResetEvent _waitEvent; - private readonly object _lock; + private readonly Lock _lock = new(); private bool _disposed; @@ -89,8 +89,6 @@ public Ptc() _waitEvent = new ManualResetEvent(true); - _lock = new object(); - _disposed = false; TitleIdText = TitleIdTextDefault; diff --git a/src/ARMeilleure/Translation/PTC/PtcProfiler.cs b/src/ARMeilleure/Translation/PTC/PtcProfiler.cs index 8e95c5e4b7..7e630ae105 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 3b91291302..7292450a66 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.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj b/src/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj index bdf46d6888..4ef3aebec8 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 $(DefaultItemExcludes);._* 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 940e47308e..d0d45122ec 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 $(DefaultItemExcludes);._* 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 671a6ad5ef..d06f661813 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Audio/AudioManager.cs b/src/Ryujinx.Audio/AudioManager.cs index 370d3d0980..8c2c0ef6b1 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 7aefe88654..6f31755a35 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 d56997e9cd..4f948673c4 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/Input/AudioInputSystem.cs b/src/Ryujinx.Audio/Input/AudioInputSystem.cs index 34623b34fd..65b99745d7 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/AudioOutputManager.cs b/src/Ryujinx.Audio/Output/AudioOutputManager.cs index 308cd1564e..4ba3fa111e 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/Output/AudioOutputSystem.cs b/src/Ryujinx.Audio/Output/AudioOutputSystem.cs index f9b9bdcf1d..dc7d52cedf 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.Audio/Renderer/Server/AudioRenderSystem.cs b/src/Ryujinx.Audio/Renderer/Server/AudioRenderSystem.cs index 246889c480..65a134af18 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 dbc2c9b3f7..8b3f394397 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.Audio/Ryujinx.Audio.csproj b/src/Ryujinx.Audio/Ryujinx.Audio.csproj index 8901bbf597..92e0fe93f8 100644 --- a/src/Ryujinx.Audio/Ryujinx.Audio.csproj +++ b/src/Ryujinx.Audio/Ryujinx.Audio.csproj @@ -1,7 +1,6 @@  - net8.0 true $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Common/PreciseSleep/NanosleepPool.cs b/src/Ryujinx.Common/PreciseSleep/NanosleepPool.cs index c0973dcb32..45b8e95fae 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 3bf092704b..cef4dc9273 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.Common/Ryujinx.Common.csproj b/src/Ryujinx.Common/Ryujinx.Common.csproj index 85d4b58bda..de163aae7e 100644 --- a/src/Ryujinx.Common/Ryujinx.Common.csproj +++ b/src/Ryujinx.Common/Ryujinx.Common.csproj @@ -1,7 +1,6 @@ - net8.0 true $(DefineConstants);$(ExtraDefineConstants) $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Cpu/AppleHv/HvVm.cs b/src/Ryujinx.Cpu/AppleHv/HvVm.cs index a12bbea9be..b4d45f36d1 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 ac1274bf6e..10ae050b6e 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 3cf279ae38..e9a342aba2 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/Ryujinx.Cpu.csproj b/src/Ryujinx.Cpu/Ryujinx.Cpu.csproj index 0a55a7dea5..e58a2ce974 100644 --- a/src/Ryujinx.Cpu/Ryujinx.Cpu.csproj +++ b/src/Ryujinx.Cpu/Ryujinx.Cpu.csproj @@ -1,7 +1,6 @@  - net8.0 true $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs b/src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs index 2985f1c215..75a6d3bf87 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.Device/Ryujinx.Graphics.Device.csproj b/src/Ryujinx.Graphics.Device/Ryujinx.Graphics.Device.csproj index 58f54de7d4..cbe2763554 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj b/src/Ryujinx.Graphics.GAL/Ryujinx.Graphics.GAL.csproj index a230296c15..b94a4ec905 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Graphics.Gpu/Memory/BufferModifiedRangeList.cs b/src/Ryujinx.Graphics.Gpu/Memory/BufferModifiedRangeList.cs index d330de638a..c5a12c1fcc 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.Gpu/Ryujinx.Graphics.Gpu.csproj b/src/Ryujinx.Graphics.Gpu/Ryujinx.Graphics.Gpu.csproj index 8c740fadcf..4cd9c1d5c8 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj b/src/Ryujinx.Graphics.Host1x/Ryujinx.Graphics.Host1x.csproj index 92077e26a2..3000d41de3 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 $(DefaultItemExcludes);._* 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 7659c4b258..9e250d1711 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 $(DefaultItemExcludes);._* 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 7659c4b258..9e250d1711 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj b/src/Ryujinx.Graphics.Nvdec/Ryujinx.Graphics.Nvdec.csproj index 7a13b5d1b8..d020ae50ea 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs b/src/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs index 345a99ffa1..7e0311407e 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 32b75c615e..889517480b 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 6385f57b56..c8ff30a07c 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.OpenGL/Ryujinx.Graphics.OpenGL.csproj b/src/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj index 931e70c03c..47cec29e2d 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj b/src/Ryujinx.Graphics.Shader/Ryujinx.Graphics.Shader.csproj index be32641ebb..cfb188dafa 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj b/src/Ryujinx.Graphics.Texture/Ryujinx.Graphics.Texture.csproj index 48d10f1d5e..2b4445aeb9 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj b/src/Ryujinx.Graphics.Vic/Ryujinx.Graphics.Vic.csproj index 820e807e6c..5505a3aa1c 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj b/src/Ryujinx.Graphics.Video/Ryujinx.Graphics.Video.csproj index d85effe32e..d64990f828 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs b/src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs index 77c5f95c98..5c8b2a761f 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 0d133e50ec..fa10f13b96 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 14d3050bfd..0bac3be121 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.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj b/src/Ryujinx.Graphics.Vulkan/Ryujinx.Graphics.Vulkan.csproj index b138e309a8..5481e57f25 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.HLE/FileSystem/ContentManager.cs b/src/Ryujinx.HLE/FileSystem/ContentManager.cs index 51f6058fc3..f5a44dcafe 100644 --- a/src/Ryujinx.HLE/FileSystem/ContentManager.cs +++ b/src/Ryujinx.HLE/FileSystem/ContentManager.cs @@ -22,6 +22,7 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; +using System.Threading; using Path = System.IO.Path; namespace Ryujinx.HLE.FileSystem @@ -55,7 +56,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) { @@ -1076,7 +1077,7 @@ public bool AreKeysAlredyPresent(string pathToCheck) { if (File.Exists(Path.Combine(pathToCheck, file))) { - return true; + return true; } } return false; diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs index e04fc64fe9..9e129f0d2e 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 3eaf64596e..a8b137df2c 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 3f16f8c24c..90231b4606 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 object _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 c725501b05..e6d96d803f 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 3d67448828..bfa6b68f66 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 object _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 0461e783ee..826a50458d 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 b5f643d239..8b7af42a01 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 5012d5d818..f7a9d77a47 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 bc3a5edf2c..9ea56d050b 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 7ecd6835db..9d5bb8d01a 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/Ssl/BuiltInCertificateManager.cs b/src/Ryujinx.HLE/HOS/Services/Ssl/BuiltInCertificateManager.cs index 49becac557..622b62c160 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 bc7bffcb63..5151930a57 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 601e858674..23bf8bcfc4 100644 --- a/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs +++ b/src/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs @@ -37,7 +37,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 3b57b18052..155733d2e4 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.HLE/Ryujinx.HLE.csproj b/src/Ryujinx.HLE/Ryujinx.HLE.csproj index 83e7b8810c..d42ecf8b88 100644 --- a/src/Ryujinx.HLE/Ryujinx.HLE.csproj +++ b/src/Ryujinx.HLE/Ryujinx.HLE.csproj @@ -1,7 +1,6 @@ - net8.0 true $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Headless.SDL2/Ryujinx.Headless.SDL2.csproj b/src/Ryujinx.Headless.SDL2/Ryujinx.Headless.SDL2.csproj index 8fbf9be1e3..fe535e6d50 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 00e0b1af91..b1caf6780a 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj b/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj index 18c639d671..7275134846 100644 --- a/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj +++ b/src/Ryujinx.Horizon/Ryujinx.Horizon.csproj @@ -1,7 +1,6 @@ - net8.0 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Horizon/Sdk/Friends/Detail/Ipc/NotificationService.cs b/src/Ryujinx.Horizon/Sdk/Friends/Detail/Ipc/NotificationService.cs index 534bf63ed6..585b40df38 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 6a0fc4f9e6..d3ed37e780 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 4063520039..879a3a58fd 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/Ryujinx.Input.SDL2.csproj b/src/Ryujinx.Input.SDL2/Ryujinx.Input.SDL2.csproj index 3d880d5faf..89f5adda17 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs b/src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs index fd34fe2199..c580e4e7d6 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 1dc87358d5..a77aa2168d 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.Input/Ryujinx.Input.csproj b/src/Ryujinx.Input/Ryujinx.Input.csproj index 0974b707a0..6741a2b3e5 100644 --- a/src/Ryujinx.Input/Ryujinx.Input.csproj +++ b/src/Ryujinx.Input/Ryujinx.Input.csproj @@ -1,7 +1,6 @@ - net8.0 true $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Memory/Ryujinx.Memory.csproj b/src/Ryujinx.Memory/Ryujinx.Memory.csproj index 17745dd61e..eda3ed17f5 100644 --- a/src/Ryujinx.Memory/Ryujinx.Memory.csproj +++ b/src/Ryujinx.Memory/Ryujinx.Memory.csproj @@ -1,7 +1,6 @@  - net8.0 true $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj b/src/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj index 0811ad850a..895d1a9ce6 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.SDL2.Common/SDL2Driver.cs b/src/Ryujinx.SDL2.Common/SDL2Driver.cs index 4d89613351..851c07867e 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.ShaderTools/Ryujinx.ShaderTools.csproj b/src/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj index 639ceeac26..08d587f9cf 100644 --- a/src/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj +++ b/src/Ryujinx.ShaderTools/Ryujinx.ShaderTools.csproj @@ -1,7 +1,6 @@ - net8.0 Exe Debug;Release $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Tests.Memory/Ryujinx.Tests.Memory.csproj b/src/Ryujinx.Tests.Memory/Ryujinx.Tests.Memory.csproj index 3bb4bf74d2..e5ebca789e 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj b/src/Ryujinx.Tests.Unicorn/Ryujinx.Tests.Unicorn.csproj index 2f7695356c..f9f42416f4 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx.Tests/Ryujinx.Tests.csproj b/src/Ryujinx.Tests/Ryujinx.Tests.csproj index 0480c206e5..daa2b4287e 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 7f57c7bf59..130ea9a50a 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 $(DefaultItemExcludes);._* diff --git a/src/Ryujinx/AppHost.cs b/src/Ryujinx/AppHost.cs index 5789737d69..8f661f9690 100644 --- a/src/Ryujinx/AppHost.cs +++ b/src/Ryujinx/AppHost.cs @@ -122,7 +122,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; @@ -680,13 +680,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], diff --git a/src/Ryujinx/Ryujinx.csproj b/src/Ryujinx/Ryujinx.csproj index 989a3a5bd4..e5f6636c3c 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 5dec0b64e4..3642709d89 100644 --- a/src/Spv.Generator/Spv.Generator.csproj +++ b/src/Spv.Generator/Spv.Generator.csproj @@ -1,7 +1,6 @@  - net8.0 $(DefaultItemExcludes);._*