mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-13 13:37:08 +00:00
misc: chore: Discard unused parameters
This commit is contained in:
parent
9c37a557dd
commit
378dc33cca
41 changed files with 96 additions and 96 deletions
|
|
@ -43,7 +43,7 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
|
|||
}
|
||||
else
|
||||
{
|
||||
_onBackendDisconnectNative = (ctx, err) => _onBackendDisconnect(err);
|
||||
_onBackendDisconnectNative = (_, err) => _onBackendDisconnect(err);
|
||||
}
|
||||
|
||||
GetContext().OnBackendDisconnected = Marshal.GetFunctionPointerForDelegate(_onBackendDisconnectNative);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
|
|||
}
|
||||
else
|
||||
{
|
||||
_writeCallbackNative = (ctx, frameCountMin, frameCountMax) => _writeCallback(frameCountMin, frameCountMax);
|
||||
_writeCallbackNative = (_, frameCountMin, frameCountMax) => _writeCallback(frameCountMin, frameCountMax);
|
||||
}
|
||||
|
||||
GetOutContext().WriteCallback = Marshal.GetFunctionPointerForDelegate(_writeCallbackNative);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace Ryujinx.Audio.Backends.SoundIo
|
|||
try
|
||||
{
|
||||
context = SoundIoContext.Create();
|
||||
context.OnBackendDisconnect = err =>
|
||||
context.OnBackendDisconnect = _ =>
|
||||
{
|
||||
backendDisconnected = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace ARMeilleure.Common
|
|||
{
|
||||
var block = new SparseMemoryBlock(size, pageInit, null);
|
||||
|
||||
_trackingEvent = (ulong address, ulong size, bool write) =>
|
||||
_trackingEvent = (ulong address, ulong _, bool _) =>
|
||||
{
|
||||
ulong pointer = (ulong)block.Block.Pointer + address;
|
||||
ensureMapped((IntPtr)pointer);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
|
|||
{
|
||||
_baseRenderer = renderer;
|
||||
|
||||
renderer.ScreenCaptured += (sender, info) => ScreenCaptured?.Invoke(this, info);
|
||||
renderer.ScreenCaptured += (_, info) => ScreenCaptured?.Invoke(this, info);
|
||||
renderer.SetInterruptAction(Interrupt);
|
||||
|
||||
Pipeline = new ThreadedPipeline(this);
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
{
|
||||
bool dirty = false;
|
||||
|
||||
EvaluateRelevantHandles(texture, (baseHandle, regionCount, split) =>
|
||||
EvaluateRelevantHandles(texture, (baseHandle, regionCount, _) =>
|
||||
{
|
||||
for (int i = 0; i < regionCount; i++)
|
||||
{
|
||||
|
|
@ -288,7 +288,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
/// <param name="texture">The texture being discarded</param>
|
||||
public void DiscardData(Texture texture)
|
||||
{
|
||||
EvaluateRelevantHandles(texture, (baseHandle, regionCount, split) =>
|
||||
EvaluateRelevantHandles(texture, (baseHandle, regionCount, _) =>
|
||||
{
|
||||
for (int i = 0; i < regionCount; i++)
|
||||
{
|
||||
|
|
@ -461,7 +461,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
/// <param name="texture">The texture to synchronize dependents of</param>
|
||||
public void SynchronizeDependents(Texture texture)
|
||||
{
|
||||
EvaluateRelevantHandles(texture, (baseHandle, regionCount, split) =>
|
||||
EvaluateRelevantHandles(texture, (baseHandle, regionCount, _) =>
|
||||
{
|
||||
for (int i = 0; i < regionCount; i++)
|
||||
{
|
||||
|
|
@ -694,7 +694,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
|
||||
ClearIncompatibleOverlaps(texture);
|
||||
|
||||
EvaluateRelevantHandles(texture, (baseHandle, regionCount, split) =>
|
||||
EvaluateRelevantHandles(texture, (baseHandle, regionCount, _) =>
|
||||
{
|
||||
for (int i = 0; i < regionCount; i++)
|
||||
{
|
||||
|
|
@ -716,7 +716,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
|
||||
ClearIncompatibleOverlaps(texture);
|
||||
|
||||
EvaluateRelevantHandles(texture, (baseHandle, regionCount, split) =>
|
||||
EvaluateRelevantHandles(texture, (baseHandle, regionCount, _) =>
|
||||
{
|
||||
for (int i = 0; i < regionCount; i++)
|
||||
{
|
||||
|
|
@ -1441,8 +1441,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
var targetRange = new List<(int BaseHandle, int RegionCount)>();
|
||||
var otherRange = new List<(int BaseHandle, int RegionCount)>();
|
||||
|
||||
EvaluateRelevantHandles(firstLayer, firstLevel, other.Info.GetSlices(), other.Info.Levels, (baseHandle, regionCount, split) => targetRange.Add((baseHandle, regionCount)));
|
||||
otherGroup.EvaluateRelevantHandles(other, (baseHandle, regionCount, split) => otherRange.Add((baseHandle, regionCount)));
|
||||
EvaluateRelevantHandles(firstLayer, firstLevel, other.Info.GetSlices(), other.Info.Levels, (baseHandle, regionCount, _) => targetRange.Add((baseHandle, regionCount)));
|
||||
otherGroup.EvaluateRelevantHandles(other, (baseHandle, regionCount, _) => otherRange.Add((baseHandle, regionCount)));
|
||||
|
||||
int targetIndex = 0;
|
||||
int otherIndex = 0;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ namespace Ryujinx.Graphics.Gpu.Synchronization
|
|||
}
|
||||
|
||||
using ManualResetEvent waitEvent = new(false);
|
||||
var info = _syncpoints[id].RegisterCallback(threshold, (x) => waitEvent.Set());
|
||||
var info = _syncpoints[id].RegisterCallback(threshold, (_) => waitEvent.Set());
|
||||
|
||||
if (info == null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
|||
{
|
||||
AstBlockVisitor visitor = new(block);
|
||||
|
||||
visitor.BlockEntered += (sender, e) =>
|
||||
visitor.BlockEntered += (_, e) =>
|
||||
{
|
||||
switch (e.Block.Type)
|
||||
{
|
||||
|
|
@ -103,7 +103,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
|||
context.EnterScope();
|
||||
};
|
||||
|
||||
visitor.BlockLeft += (sender, e) =>
|
||||
visitor.BlockLeft += (_, e) =>
|
||||
{
|
||||
context.LeaveScope();
|
||||
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
|
||||
context.LoopTargets = loopTargets;
|
||||
|
||||
visitor.BlockEntered += (sender, e) =>
|
||||
visitor.BlockEntered += (_, e) =>
|
||||
{
|
||||
AstBlock mergeBlock = e.Block.Parent;
|
||||
|
||||
|
|
@ -347,7 +347,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
context.EnterBlock(e.Block);
|
||||
};
|
||||
|
||||
visitor.BlockLeft += (sender, e) =>
|
||||
visitor.BlockLeft += (_, e) =>
|
||||
{
|
||||
if (e.Block.Parent != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -746,7 +746,7 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
|
||||
private static PatternTreeNode<byte> Label()
|
||||
{
|
||||
return new(InstName.Invalid, (op) => true, type: TreeNodeType.Label);
|
||||
return new(InstName.Invalid, (_) => true, type: TreeNodeType.Label);
|
||||
}
|
||||
|
||||
private static PatternTreeNode<InstLopR> Lop(bool negB, LogicOp logicOp)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
var key = new PlceKey(setDescriptors, usePushDescriptors);
|
||||
|
||||
return _plces.GetOrAdd(key, newKey => new PipelineLayoutCacheEntry(gd, device, setDescriptors, usePushDescriptors));
|
||||
return _plces.GetOrAdd(key, _ => new PipelineLayoutCacheEntry(gd, device, setDescriptors, usePushDescriptors));
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace Ryujinx.HLE.FileSystem
|
|||
{
|
||||
var romfsStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
|
||||
|
||||
_romFsByPid.AddOrUpdate(pid, romfsStream, (pid, oldStream) =>
|
||||
_romFsByPid.AddOrUpdate(pid, romfsStream, (_, oldStream) =>
|
||||
{
|
||||
oldStream.Close();
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ namespace Ryujinx.HLE.FileSystem
|
|||
|
||||
public void SetRomFs(ulong pid, Stream romfsStream)
|
||||
{
|
||||
_romFsByPid.AddOrUpdate(pid, romfsStream, (pid, oldStream) =>
|
||||
_romFsByPid.AddOrUpdate(pid, romfsStream, (_, oldStream) =>
|
||||
{
|
||||
oldStream.Close();
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
|||
|
||||
UserProfile profile = new(userId, name, image);
|
||||
|
||||
_profiles.AddOrUpdate(userId.ToString(), profile, (key, old) => profile);
|
||||
_profiles.AddOrUpdate(userId.ToString(), profile, (_, _) => profile);
|
||||
|
||||
_accountSaveDataManager.Save(_profiles);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
|||
{
|
||||
UserProfile addedProfile = new(new UserId(profile.UserId), profile.Name, profile.Image, profile.LastModifiedTimestamp);
|
||||
|
||||
profiles.AddOrUpdate(profile.UserId, addedProfile, (key, old) => addedProfile);
|
||||
profiles.AddOrUpdate(profile.UserId, addedProfile, (_, _) => addedProfile);
|
||||
}
|
||||
|
||||
LastOpened = new UserId(profilesJson.LastOpened);
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
|||
|
||||
if (_publicPort != 0)
|
||||
{
|
||||
_ = Task.Delay(PortLeaseRenew * 1000, _disposedCancellation.Token).ContinueWith((task) => Task.Run(RefreshLease));
|
||||
_ = Task.Delay(PortLeaseRenew * 1000, _disposedCancellation.Token).ContinueWith((_) => Task.Run(RefreshLease));
|
||||
}
|
||||
|
||||
_natDevice = device;
|
||||
|
|
@ -257,7 +257,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
|||
|
||||
}
|
||||
|
||||
_ = Task.Delay(PortLeaseRenew, _disposedCancellation.Token).ContinueWith((task) => Task.Run(RefreshLease));
|
||||
_ = Task.Delay(PortLeaseRenew, _disposedCancellation.Token).ContinueWith((_) => Task.Run(RefreshLease));
|
||||
}
|
||||
|
||||
public bool TryRegisterUser(P2pProxySession session, ExternalProxyConfig config)
|
||||
|
|
@ -367,7 +367,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy
|
|||
Task delete = _natDevice?.DeletePortMapAsync(new Mapping(Protocol.Tcp, PrivatePort, _publicPort, 60, "Ryujinx Local Multiplayer"));
|
||||
|
||||
// Just absorb any exceptions.
|
||||
delete?.ContinueWith((task) => { });
|
||||
delete?.ContinueWith((_) => { });
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||
}
|
||||
else
|
||||
{
|
||||
item.Fence.RegisterCallback(_device.Gpu, (x) =>
|
||||
item.Fence.RegisterCallback(_device.Gpu, (_) =>
|
||||
{
|
||||
_device.Gpu.Window.SignalFrameReady();
|
||||
_device.Gpu.GPFifo.Interrupt();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace Ryujinx.Memory.Tracking
|
|||
{
|
||||
if (handle != null)
|
||||
{
|
||||
handle?.RegisterAction((address, size) => action(handle.Address, handle.Size));
|
||||
handle?.RegisterAction((_, _) => action(handle.Address, handle.Size));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ namespace Ryujinx.Memory.Tracking
|
|||
{
|
||||
if (handle != null)
|
||||
{
|
||||
handle?.RegisterPreciseAction((address, size, write) => action(handle.Address, handle.Size, write));
|
||||
handle?.RegisterPreciseAction((_, _, write) => action(handle.Address, handle.Size, write));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace Ryujinx.Tests.Memory
|
|||
int regionCount = 0;
|
||||
ulong lastAddress = startAddress;
|
||||
|
||||
handle.QueryModified(startAddress, size, (address, range) =>
|
||||
handle.QueryModified(startAddress, size, (address, _) =>
|
||||
{
|
||||
Assert.IsTrue(addressPredicate(address)); // Written pages must be even.
|
||||
Assert.GreaterOrEqual(address, lastAddress); // Must be signalled in ascending order, regardless of write order.
|
||||
|
|
@ -70,7 +70,7 @@ namespace Ryujinx.Tests.Memory
|
|||
int regionCount = 0;
|
||||
ulong lastAddress = startAddress;
|
||||
|
||||
handle.QueryModified(startAddress, size, (address, range) =>
|
||||
handle.QueryModified(startAddress, size, (address, _) =>
|
||||
{
|
||||
Assert.IsTrue(addressPredicate(address)); // Written pages must be even.
|
||||
Assert.GreaterOrEqual(address, lastAddress); // Must be signalled in ascending order, regardless of write order.
|
||||
|
|
@ -89,7 +89,7 @@ namespace Ryujinx.Tests.Memory
|
|||
RandomOrder(random, Enumerable.Range(0, pageCount).ToList(), (i) =>
|
||||
{
|
||||
ulong resultAddress = ulong.MaxValue;
|
||||
handle.QueryModified((ulong)i * PageSize + address, PageSize, (address, range) =>
|
||||
handle.QueryModified((ulong)i * PageSize + address, PageSize, (address, _) =>
|
||||
{
|
||||
resultAddress = address;
|
||||
});
|
||||
|
|
@ -166,7 +166,7 @@ namespace Ryujinx.Tests.Memory
|
|||
|
||||
foreach (int index in odd)
|
||||
{
|
||||
handle.QueryModified((ulong)index * PageSize, PageSize, (address, range) =>
|
||||
handle.QueryModified((ulong)index * PageSize, PageSize, (_, _) =>
|
||||
{
|
||||
oddRegionCount++;
|
||||
}, 1);
|
||||
|
|
@ -186,7 +186,7 @@ namespace Ryujinx.Tests.Memory
|
|||
|
||||
oddRegionCount = 0;
|
||||
|
||||
handle.QueryModified(0, PageSize * PageCount, (address, range) => { oddRegionCount++; }, 1);
|
||||
handle.QueryModified(0, PageSize * PageCount, (_, _) => { oddRegionCount++; }, 1);
|
||||
|
||||
Assert.AreEqual(oddRegionCount, 0); // Sequence number has not changed, so found no dirty subregions.
|
||||
|
||||
|
|
@ -214,7 +214,7 @@ namespace Ryujinx.Tests.Memory
|
|||
for (int i = 0; i < regionSizes.Length; i++)
|
||||
{
|
||||
int region = regionSizes[i];
|
||||
handle.QueryModified(address, (ulong)(PageSize * region), (address, size) => { });
|
||||
handle.QueryModified(address, (ulong)(PageSize * region), (_, _) => { });
|
||||
|
||||
// There should be a gap between regions,
|
||||
// So that they don't combine and we can see the full effects.
|
||||
|
|
@ -222,7 +222,7 @@ namespace Ryujinx.Tests.Memory
|
|||
}
|
||||
|
||||
// Clear modified.
|
||||
handle.QueryModified((address, size) => { });
|
||||
handle.QueryModified((_, _) => { });
|
||||
|
||||
// Trigger each region with a 1 byte write.
|
||||
address = 0;
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ namespace Ryujinx.Tests.Memory
|
|||
void RegisterReadAction()
|
||||
{
|
||||
registeredCount++;
|
||||
handle.RegisterAction((address, size) =>
|
||||
handle.RegisterAction((_, _) =>
|
||||
{
|
||||
isRegistered = false;
|
||||
Interlocked.Increment(ref triggeredCount);
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
IsAscendingOrder = new ReactiveObject<bool>();
|
||||
LanguageCode = new ReactiveObject<string>();
|
||||
ShowConsole = new ReactiveObject<bool>();
|
||||
ShowConsole.Event += static (s, e) => { ConsoleHelper.SetConsoleWindowState(e.NewValue); };
|
||||
ShowConsole.Event += static (_, e) => { ConsoleHelper.SetConsoleWindowState(e.NewValue); };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
EnableFsAccessLog = new ReactiveObject<bool>();
|
||||
FilteredClasses = new ReactiveObject<LogClass[]>();
|
||||
EnableFileLog = new ReactiveObject<bool>();
|
||||
EnableFileLog.Event += static (sender, e) => LogValueChange(e, nameof(EnableFileLog));
|
||||
EnableFileLog.Event += static (_, e) => LogValueChange(e, nameof(EnableFileLog));
|
||||
GraphicsDebugLevel = new ReactiveObject<GraphicsDebugLevel>();
|
||||
}
|
||||
}
|
||||
|
|
@ -401,18 +401,18 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
Region = new ReactiveObject<Region>();
|
||||
TimeZone = new ReactiveObject<string>();
|
||||
SystemTimeOffset = new ReactiveObject<long>();
|
||||
SystemTimeOffset.Event += static (sender, e) => LogValueChange(e, nameof(SystemTimeOffset));
|
||||
SystemTimeOffset.Event += static (_, e) => LogValueChange(e, nameof(SystemTimeOffset));
|
||||
MatchSystemTime = new ReactiveObject<bool>();
|
||||
MatchSystemTime.Event += static (sender, e) => LogValueChange(e, nameof(MatchSystemTime));
|
||||
MatchSystemTime.Event += static (_, e) => LogValueChange(e, nameof(MatchSystemTime));
|
||||
EnableDockedMode = new ReactiveObject<bool>();
|
||||
EnableDockedMode.Event += static (sender, e) => LogValueChange(e, nameof(EnableDockedMode));
|
||||
EnableDockedMode.Event += static (_, e) => LogValueChange(e, nameof(EnableDockedMode));
|
||||
EnablePtc = new ReactiveObject<bool>();
|
||||
EnablePtc.Event += static (sender, e) => LogValueChange(e, nameof(EnablePtc));
|
||||
EnablePtc.Event += static (_, e) => LogValueChange(e, nameof(EnablePtc));
|
||||
EnableLowPowerPtc = new ReactiveObject<bool>();
|
||||
EnableLowPowerPtc.Event += static (sender, e) => LogValueChange(e, nameof(EnableLowPowerPtc));
|
||||
EnableLowPowerPtc.Event += static (_, e) => LogValueChange(e, nameof(EnableLowPowerPtc));
|
||||
TickScalar = new ReactiveObject<long>();
|
||||
TickScalar.Event += static (sender, e) => LogValueChange(e, nameof(TickScalar));
|
||||
TickScalar.Event += static (sender, e) =>
|
||||
TickScalar.Event += static (_, e) => LogValueChange(e, nameof(TickScalar));
|
||||
TickScalar.Event += static (_, e) =>
|
||||
{
|
||||
if (Switch.Shared is null)
|
||||
return;
|
||||
|
|
@ -420,23 +420,23 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
Switch.Shared.Configuration.TickScalar = e.NewValue;
|
||||
};
|
||||
EnableInternetAccess = new ReactiveObject<bool>();
|
||||
EnableInternetAccess.Event += static (sender, e) => LogValueChange(e, nameof(EnableInternetAccess));
|
||||
EnableInternetAccess.Event += static (_, e) => LogValueChange(e, nameof(EnableInternetAccess));
|
||||
EnableFsIntegrityChecks = new ReactiveObject<bool>();
|
||||
EnableFsIntegrityChecks.Event += static (sender, e) => LogValueChange(e, nameof(EnableFsIntegrityChecks));
|
||||
EnableFsIntegrityChecks.Event += static (_, e) => LogValueChange(e, nameof(EnableFsIntegrityChecks));
|
||||
FsGlobalAccessLogMode = new ReactiveObject<int>();
|
||||
FsGlobalAccessLogMode.Event += static (sender, e) => LogValueChange(e, nameof(FsGlobalAccessLogMode));
|
||||
FsGlobalAccessLogMode.Event += static (_, e) => LogValueChange(e, nameof(FsGlobalAccessLogMode));
|
||||
AudioBackend = new ReactiveObject<AudioBackend>();
|
||||
AudioBackend.Event += static (sender, e) => LogValueChange(e, nameof(AudioBackend));
|
||||
AudioBackend.Event += static (_, e) => LogValueChange(e, nameof(AudioBackend));
|
||||
MemoryManagerMode = new ReactiveObject<MemoryManagerMode>();
|
||||
MemoryManagerMode.Event += static (sender, e) => LogValueChange(e, nameof(MemoryManagerMode));
|
||||
MemoryManagerMode.Event += static (_, e) => LogValueChange(e, nameof(MemoryManagerMode));
|
||||
DramSize = new ReactiveObject<MemoryConfiguration>();
|
||||
DramSize.Event += static (sender, e) => LogValueChange(e, nameof(DramSize));
|
||||
DramSize.Event += static (_, e) => LogValueChange(e, nameof(DramSize));
|
||||
IgnoreMissingServices = new ReactiveObject<bool>();
|
||||
IgnoreMissingServices.Event += static (sender, e) => LogValueChange(e, nameof(IgnoreMissingServices));
|
||||
IgnoreMissingServices.Event += static (_, e) => LogValueChange(e, nameof(IgnoreMissingServices));
|
||||
AudioVolume = new ReactiveObject<float>();
|
||||
AudioVolume.Event += static (sender, e) => LogValueChange(e, nameof(AudioVolume));
|
||||
AudioVolume.Event += static (_, e) => LogValueChange(e, nameof(AudioVolume));
|
||||
UseHypervisor = new ReactiveObject<bool>();
|
||||
UseHypervisor.Event += static (sender, e) => LogValueChange(e, nameof(UseHypervisor));
|
||||
UseHypervisor.Event += static (_, e) => LogValueChange(e, nameof(UseHypervisor));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -574,40 +574,40 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
public GraphicsSection()
|
||||
{
|
||||
BackendThreading = new ReactiveObject<BackendThreading>();
|
||||
BackendThreading.Event += static (sender, e) => LogValueChange(e, nameof(BackendThreading));
|
||||
BackendThreading.Event += static (_, e) => LogValueChange(e, nameof(BackendThreading));
|
||||
ResScale = new ReactiveObject<int>();
|
||||
ResScale.Event += static (sender, e) => LogValueChange(e, nameof(ResScale));
|
||||
ResScale.Event += static (_, e) => LogValueChange(e, nameof(ResScale));
|
||||
ResScaleCustom = new ReactiveObject<float>();
|
||||
ResScaleCustom.Event += static (sender, e) => LogValueChange(e, nameof(ResScaleCustom));
|
||||
ResScaleCustom.Event += static (_, e) => LogValueChange(e, nameof(ResScaleCustom));
|
||||
MaxAnisotropy = new ReactiveObject<float>();
|
||||
MaxAnisotropy.Event += static (sender, e) => LogValueChange(e, nameof(MaxAnisotropy));
|
||||
MaxAnisotropy.Event += static (_, e) => LogValueChange(e, nameof(MaxAnisotropy));
|
||||
AspectRatio = new ReactiveObject<AspectRatio>();
|
||||
AspectRatio.Event += static (sender, e) => LogValueChange(e, nameof(AspectRatio));
|
||||
AspectRatio.Event += static (_, e) => LogValueChange(e, nameof(AspectRatio));
|
||||
ShadersDumpPath = new ReactiveObject<string>();
|
||||
VSyncMode = new ReactiveObject<VSyncMode>();
|
||||
VSyncMode.Event += static (sender, e) => LogValueChange(e, nameof(VSyncMode));
|
||||
VSyncMode.Event += static (_, e) => LogValueChange(e, nameof(VSyncMode));
|
||||
EnableCustomVSyncInterval = new ReactiveObject<bool>();
|
||||
EnableCustomVSyncInterval.Event += static (sender, e) => LogValueChange(e, nameof(EnableCustomVSyncInterval));
|
||||
EnableCustomVSyncInterval.Event += static (_, e) => LogValueChange(e, nameof(EnableCustomVSyncInterval));
|
||||
CustomVSyncInterval = new ReactiveObject<int>();
|
||||
CustomVSyncInterval.Event += static (sender, e) => LogValueChange(e, nameof(CustomVSyncInterval));
|
||||
CustomVSyncInterval.Event += static (_, e) => LogValueChange(e, nameof(CustomVSyncInterval));
|
||||
EnableShaderCache = new ReactiveObject<bool>();
|
||||
EnableShaderCache.Event += static (sender, e) => LogValueChange(e, nameof(EnableShaderCache));
|
||||
EnableShaderCache.Event += static (_, e) => LogValueChange(e, nameof(EnableShaderCache));
|
||||
EnableTextureRecompression = new ReactiveObject<bool>();
|
||||
EnableTextureRecompression.Event += static (sender, e) => LogValueChange(e, nameof(EnableTextureRecompression));
|
||||
EnableTextureRecompression.Event += static (_, e) => LogValueChange(e, nameof(EnableTextureRecompression));
|
||||
GraphicsBackend = new ReactiveObject<GraphicsBackend>();
|
||||
GraphicsBackend.Event += static (sender, e) => LogValueChange(e, nameof(GraphicsBackend));
|
||||
GraphicsBackend.Event += static (_, e) => LogValueChange(e, nameof(GraphicsBackend));
|
||||
PreferredGpu = new ReactiveObject<string>();
|
||||
PreferredGpu.Event += static (sender, e) => LogValueChange(e, nameof(PreferredGpu));
|
||||
PreferredGpu.Event += static (_, e) => LogValueChange(e, nameof(PreferredGpu));
|
||||
EnableMacroHLE = new ReactiveObject<bool>();
|
||||
EnableMacroHLE.Event += static (sender, e) => LogValueChange(e, nameof(EnableMacroHLE));
|
||||
EnableMacroHLE.Event += static (_, e) => LogValueChange(e, nameof(EnableMacroHLE));
|
||||
EnableColorSpacePassthrough = new ReactiveObject<bool>();
|
||||
EnableColorSpacePassthrough.Event += static (sender, e) => LogValueChange(e, nameof(EnableColorSpacePassthrough));
|
||||
EnableColorSpacePassthrough.Event += static (_, e) => LogValueChange(e, nameof(EnableColorSpacePassthrough));
|
||||
AntiAliasing = new ReactiveObject<AntiAliasing>();
|
||||
AntiAliasing.Event += static (sender, e) => LogValueChange(e, nameof(AntiAliasing));
|
||||
AntiAliasing.Event += static (_, e) => LogValueChange(e, nameof(AntiAliasing));
|
||||
ScalingFilter = new ReactiveObject<ScalingFilter>();
|
||||
ScalingFilter.Event += static (sender, e) => LogValueChange(e, nameof(ScalingFilter));
|
||||
ScalingFilter.Event += static (_, e) => LogValueChange(e, nameof(ScalingFilter));
|
||||
ScalingFilterLevel = new ReactiveObject<int>();
|
||||
ScalingFilterLevel.Event += static (sender, e) => LogValueChange(e, nameof(ScalingFilterLevel));
|
||||
ScalingFilterLevel.Event += static (_, e) => LogValueChange(e, nameof(ScalingFilterLevel));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Ryujinx.Ava.Common.Locale
|
|||
|
||||
builder
|
||||
.Property(new ClrPropertyInfo("Item",
|
||||
obj => (LocaleManager.Instance[keyToUse]),
|
||||
_ => (LocaleManager.Instance[keyToUse]),
|
||||
null,
|
||||
typeof(string)), (weakRef, iPropInfo) =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Ryujinx.Headless
|
|||
Task.Run(Updater.CleanupUpdate);
|
||||
|
||||
// Hook unhandled exception and process exit events.
|
||||
AppDomain.CurrentDomain.UnhandledException += (sender, e)
|
||||
AppDomain.CurrentDomain.UnhandledException += (_, e)
|
||||
=> Program.ProcessUnhandledException(e.ExceptionObject as Exception, e.IsTerminating);
|
||||
AppDomain.CurrentDomain.ProcessExit += (_, _) => Program.Exit();
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ namespace Ryujinx.Headless
|
|||
|
||||
return new VulkanRenderer(
|
||||
api,
|
||||
(instance, vk) => new SurfaceKHR((ulong)(vulkanWindow.CreateWindowSurface(instance.Handle))),
|
||||
(instance, _) => new SurfaceKHR((ulong)(vulkanWindow.CreateWindowSurface(instance.Handle))),
|
||||
vulkanWindow.GetRequiredInstanceExtensions,
|
||||
preferredGpuId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ namespace Ryujinx.Headless
|
|||
|
||||
// TODO: This should be removed when the issue with the GateThread is resolved.
|
||||
|
||||
ThreadPool.QueueUserWorkItem(state => { });
|
||||
ThreadPool.QueueUserWorkItem(_ => { });
|
||||
Thread.Sleep(300);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ namespace Ryujinx.Modules
|
|||
XamlRoot = parent,
|
||||
};
|
||||
|
||||
taskDialog.Opened += (s, e) =>
|
||||
taskDialog.Opened += (_, _) =>
|
||||
{
|
||||
if (_buildSize >= 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -100,11 +100,11 @@ namespace Ryujinx.Ava
|
|||
Console.Title = $"Ryujinx Console {Version}";
|
||||
|
||||
// Hook unhandled exception and process exit events.
|
||||
AppDomain.CurrentDomain.UnhandledException += (sender, e)
|
||||
AppDomain.CurrentDomain.UnhandledException += (_, e)
|
||||
=> ProcessUnhandledException(e.ExceptionObject as Exception, e.IsTerminating);
|
||||
TaskScheduler.UnobservedTaskException += (sender, e)
|
||||
TaskScheduler.UnobservedTaskException += (_, e)
|
||||
=> ProcessUnhandledException(e.Exception, false);
|
||||
AppDomain.CurrentDomain.ProcessExit += (sender, e) => Exit();
|
||||
AppDomain.CurrentDomain.ProcessExit += (_, _) => Exit();
|
||||
|
||||
// Setup base data directory.
|
||||
AppDataManager.Initialize(CommandLineState.BaseDirPathArg);
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ namespace Ryujinx.Ava.UI.Controls
|
|||
{
|
||||
Error.IsVisible = false;
|
||||
|
||||
_checkLength = length => true;
|
||||
_checkLength = _ => true;
|
||||
}
|
||||
else if (_inputMin > 0 && _inputMax == int.MaxValue)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ namespace Ryujinx.Ava.UI.Controls
|
|||
Padding = new Thickness(0),
|
||||
};
|
||||
|
||||
contentDialog.Closed += (sender, args) =>
|
||||
contentDialog.Closed += (_, _) =>
|
||||
{
|
||||
content.ViewModel.Dispose();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
_ = maybeAsyncWorkQueue.Value;
|
||||
};
|
||||
|
||||
host.Closing += (sender, args) =>
|
||||
host.Closing += (_, _) =>
|
||||
{
|
||||
if (maybeAsyncWorkQueue.IsValueCreated)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ namespace Ryujinx.Ava.UI.Renderer
|
|||
metalLayer.SendMessage("setContentsScale:", Program.DesktopScaleFactor);
|
||||
|
||||
// Ensure the scale factor is up to date.
|
||||
_updateBoundsCallback = rect =>
|
||||
_updateBoundsCallback = _ =>
|
||||
{
|
||||
metalLayer.SendMessage("setContentsScale:", Program.DesktopScaleFactor);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||
IKeyboard keyboard = (IKeyboard)viewModel.ParentModel.AvaloniaKeyboardDriver.GetGamepad("0"); // Open Avalonia keyboard for cancel operations.
|
||||
IButtonAssigner assigner = CreateButtonAssigner(isStick);
|
||||
|
||||
_currentAssigner.ButtonAssigned += (sender, e) =>
|
||||
_currentAssigner.ButtonAssigned += (_, e) =>
|
||||
{
|
||||
if (e.ButtonValue.HasValue)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||
IKeyboard keyboard = (IKeyboard)viewModel.ParentModel.AvaloniaKeyboardDriver.GetGamepad("0"); // Open Avalonia keyboard for cancel operations.
|
||||
IButtonAssigner assigner = CreateButtonAssigner();
|
||||
|
||||
_currentAssigner.ButtonAssigned += (sender, e) =>
|
||||
_currentAssigner.ButtonAssigned += (_, e) =>
|
||||
{
|
||||
if (e.ButtonValue.HasValue)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||
CloseButtonText = LocaleManager.Instance[LocaleKeys.ControllerSettingsClose],
|
||||
Content = content,
|
||||
};
|
||||
contentDialog.PrimaryButtonClick += (sender, args) =>
|
||||
contentDialog.PrimaryButtonClick += (_, _) =>
|
||||
{
|
||||
var config = viewModel.Config;
|
||||
config.Slot = content._viewModel.Slot;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||
Content = content,
|
||||
};
|
||||
|
||||
contentDialog.PrimaryButtonClick += (sender, args) =>
|
||||
contentDialog.PrimaryButtonClick += (_, _) =>
|
||||
{
|
||||
var config = viewModel.Config;
|
||||
config.StrongRumble = content._viewModel.StrongRumble;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||
var keyboard = (IKeyboard)_avaloniaKeyboardDriver.GetGamepad("0");
|
||||
IButtonAssigner assigner = new KeyboardKeyAssigner(keyboard);
|
||||
|
||||
_currentAssigner.ButtonAssigned += (sender, e) =>
|
||||
_currentAssigner.ButtonAssigned += (_, e) =>
|
||||
{
|
||||
if (e.ButtonValue.HasValue)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
|||
public UserEditorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
AddHandler(Frame.NavigatedToEvent, (s, e) =>
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
AddHandler(Frame.NavigatedToEvent, (s, e) =>
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
|||
public UserProfileImageSelectorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
AddHandler(Frame.NavigatedToEvent, (s, e) =>
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
|||
public UserRecovererView()
|
||||
{
|
||||
InitializeComponent();
|
||||
AddHandler(Frame.NavigatedToEvent, (s, e) =>
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
|||
public UserSaveManagerView()
|
||||
{
|
||||
InitializeComponent();
|
||||
AddHandler(Frame.NavigatedToEvent, (s, e) =>
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
|||
|
||||
if (Program.PreviewerDetached)
|
||||
{
|
||||
AddHandler(Frame.NavigatedToEvent, (s, e) =>
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
|
|
|
|||
|
|
@ -611,7 +611,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
if (ViewModel.AppHost != null)
|
||||
{
|
||||
ViewModel.AppHost.AppExit -= ViewModel.AppHost_AppExit;
|
||||
ViewModel.AppHost.AppExit += (sender, e) =>
|
||||
ViewModel.AppHost.AppExit += (_, _) =>
|
||||
{
|
||||
ViewModel.AppHost = null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue