mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-09 06:28:59 +02:00
misc: chore: Discard unused parameters
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user