From 851d81d24ab437bbe552a085cdd3caad6f4a1867 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> Date: Sat, 10 Dec 2022 15:21:13 -0500 Subject: [PATCH] Fix Redundant Qualifer Warnings (#4091) * Fix Redundant Qualifer Warnings * Remove unnecessary using --- Ryujinx.Ava/Modules/Updater/Updater.cs | 2 +- .../Applet/AvaloniaDynamicTextInputHandler.cs | 2 +- .../Ui/Controls/ContentDialogHelper.cs | 10 ++++---- Ryujinx.Ava/Ui/Controls/EmbeddedWindow.cs | 8 +++---- .../ViewModels/ControllerSettingsViewModel.cs | 4 ++-- .../Windows/ControllerSettingsWindow.axaml.cs | 4 ++-- Ryujinx.Graphics.GAL/SamplerCreateInfo.cs | 2 +- .../Shader/ShaderSpecializationState.cs | 6 ++--- .../CodeGen/Spirv/Declarations.cs | 6 ++--- Ryujinx.Graphics.Vulkan/BufferHolder.cs | 8 +++---- .../DescriptorSetUpdater.cs | 2 +- .../DisposableBufferView.cs | 2 +- .../PipelineLayoutFactory.cs | 24 +++++++++---------- .../ApplicationProxy/IApplicationFunctions.cs | 4 ++-- .../HOS/Services/Fs/IFileSystemProxy.cs | 2 +- .../Time/TimeZone/TimeZoneContentManager.cs | 2 +- Ryujinx.Tests.Unicorn/UnicornAArch32.cs | 6 ++--- Ryujinx.Tests.Unicorn/UnicornAArch64.cs | 6 ++--- Ryujinx/Modules/Updater/UpdateDialog.cs | 2 +- Ryujinx/Modules/Updater/Updater.cs | 2 +- Ryujinx/Program.cs | 4 ++-- Ryujinx/Ui/RendererWidgetBase.cs | 8 +++---- 22 files changed, 57 insertions(+), 59 deletions(-) diff --git a/Ryujinx.Ava/Modules/Updater/Updater.cs b/Ryujinx.Ava/Modules/Updater/Updater.cs index 2f9258bd0..a48156c4d 100644 --- a/Ryujinx.Ava/Modules/Updater/Updater.cs +++ b/Ryujinx.Ava/Modules/Updater/Updater.cs @@ -355,7 +355,7 @@ namespace Ryujinx.Modules list[index] = args.Result; Interlocked.Increment(ref completedRequests); - if (Interlocked.Equals(completedRequests, ConnectionCount)) + if (Equals(completedRequests, ConnectionCount)) { byte[] mergedFileBytes = new byte[_buildSize]; for (int connectionIndex = 0, destinationOffset = 0; connectionIndex < ConnectionCount; connectionIndex++) diff --git a/Ryujinx.Ava/Ui/Applet/AvaloniaDynamicTextInputHandler.cs b/Ryujinx.Ava/Ui/Applet/AvaloniaDynamicTextInputHandler.cs index ee0d435b0..78692ceda 100644 --- a/Ryujinx.Ava/Ui/Applet/AvaloniaDynamicTextInputHandler.cs +++ b/Ryujinx.Ava/Ui/Applet/AvaloniaDynamicTextInputHandler.cs @@ -66,7 +66,7 @@ namespace Ryujinx.Ava.Ui.Applet }); } - private void AvaloniaDynamicTextInputHandler_KeyRelease(object sender, Avalonia.Input.KeyEventArgs e) + private void AvaloniaDynamicTextInputHandler_KeyRelease(object sender, KeyEventArgs e) { var key = (HidKey)AvaloniaKeyboardMappingHelper.ToInputKey(e.Key); diff --git a/Ryujinx.Ava/Ui/Controls/ContentDialogHelper.cs b/Ryujinx.Ava/Ui/Controls/ContentDialogHelper.cs index 9cf4231c5..eca476449 100644 --- a/Ryujinx.Ava/Ui/Controls/ContentDialogHelper.cs +++ b/Ryujinx.Ava/Ui/Controls/ContentDialogHelper.cs @@ -222,7 +222,7 @@ namespace Ryujinx.Ava.Ui.Controls content.MinHeight = 80; - SymbolIcon icon = new SymbolIcon { Symbol = (Symbol)symbol, Margin = new Avalonia.Thickness(10) }; + SymbolIcon icon = new SymbolIcon { Symbol = (Symbol)symbol, Margin = new Thickness(10) }; icon.FontSize = 40; icon.VerticalAlignment = Avalonia.Layout.VerticalAlignment.Center; Grid.SetColumn(icon, 0); @@ -232,15 +232,15 @@ namespace Ryujinx.Ava.Ui.Controls TextBlock primaryLabel = new TextBlock() { Text = primaryText, - Margin = new Avalonia.Thickness(5), - TextWrapping = Avalonia.Media.TextWrapping.Wrap, + Margin = new Thickness(5), + TextWrapping = TextWrapping.Wrap, MaxWidth = 450 }; TextBlock secondaryLabel = new TextBlock() { Text = secondaryText, - Margin = new Avalonia.Thickness(5), - TextWrapping = Avalonia.Media.TextWrapping.Wrap, + Margin = new Thickness(5), + TextWrapping = TextWrapping.Wrap, MaxWidth = 450 }; diff --git a/Ryujinx.Ava/Ui/Controls/EmbeddedWindow.cs b/Ryujinx.Ava/Ui/Controls/EmbeddedWindow.cs index 6ef159821..260075911 100644 --- a/Ryujinx.Ava/Ui/Controls/EmbeddedWindow.cs +++ b/Ryujinx.Ava/Ui/Controls/EmbeddedWindow.cs @@ -39,7 +39,7 @@ namespace Ryujinx.Ava.Ui.Controls public EmbeddedWindow() { - var stateObserverable = this.GetObservable(Control.BoundsProperty); + var stateObserverable = this.GetObservable(BoundsProperty); stateObserverable.Subscribe(StateChanged); @@ -165,7 +165,7 @@ namespace Ryujinx.Ava.Ui.Controls isLeft = msg == WindowsMessages.LBUTTONDOWN; this.RaiseEvent(new PointerPressedEventArgs( this, - new Avalonia.Input.Pointer(0, PointerType.Mouse, true), + new Pointer(0, PointerType.Mouse, true), root, this.TranslatePoint(point, root).Value, (ulong)Environment.TickCount64, @@ -177,7 +177,7 @@ namespace Ryujinx.Ava.Ui.Controls isLeft = msg == WindowsMessages.LBUTTONUP; this.RaiseEvent(new PointerReleasedEventArgs( this, - new Avalonia.Input.Pointer(0, PointerType.Mouse, true), + new Pointer(0, PointerType.Mouse, true), root, this.TranslatePoint(point, root).Value, (ulong)Environment.TickCount64, @@ -189,7 +189,7 @@ namespace Ryujinx.Ava.Ui.Controls this.RaiseEvent(new PointerEventArgs( PointerMovedEvent, this, - new Avalonia.Input.Pointer(0, PointerType.Mouse, true), + new Pointer(0, PointerType.Mouse, true), root, this.TranslatePoint(point, root).Value, (ulong)Environment.TickCount64, diff --git a/Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs b/Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs index 8d0124437..c76903168 100644 --- a/Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs +++ b/Ryujinx.Ava/Ui/ViewModels/ControllerSettingsViewModel.cs @@ -545,7 +545,7 @@ namespace Ryujinx.Ava.Ui.ViewModels config = new StandardKeyboardInputConfig { - Version = Ryujinx.Common.Configuration.Hid.InputConfig.CurrentVersion, + Version = InputConfig.CurrentVersion, Backend = InputBackendType.WindowKeyboard, Id = id, ControllerType = ControllerType.ProController, @@ -600,7 +600,7 @@ namespace Ryujinx.Ava.Ui.ViewModels config = new StandardControllerInputConfig { - Version = Ryujinx.Common.Configuration.Hid.InputConfig.CurrentVersion, + Version = InputConfig.CurrentVersion, Backend = InputBackendType.GamepadSDL2, Id = id, ControllerType = ControllerType.ProController, diff --git a/Ryujinx.Ava/Ui/Windows/ControllerSettingsWindow.axaml.cs b/Ryujinx.Ava/Ui/Windows/ControllerSettingsWindow.axaml.cs index 82ef75ca5..8f2afc1dc 100644 --- a/Ryujinx.Ava/Ui/Windows/ControllerSettingsWindow.axaml.cs +++ b/Ryujinx.Ava/Ui/Windows/ControllerSettingsWindow.axaml.cs @@ -104,11 +104,11 @@ namespace Ryujinx.Ava.Ui.Windows var device = ViewModel.Devices[ViewModel.Device]; - if (device.Type == Models.DeviceType.Keyboard) + if (device.Type == DeviceType.Keyboard) { assigner = new KeyboardKeyAssigner((IKeyboard)ViewModel.SelectedGamepad); } - else if (device.Type == Models.DeviceType.Controller) + else if (device.Type == DeviceType.Controller) { assigner = new GamepadButtonAssigner(ViewModel.SelectedGamepad, (ViewModel.Config as StandardControllerInputConfig).TriggerThreshold, forStick); } diff --git a/Ryujinx.Graphics.GAL/SamplerCreateInfo.cs b/Ryujinx.Graphics.GAL/SamplerCreateInfo.cs index 4c514671c..990c302e2 100644 --- a/Ryujinx.Graphics.GAL/SamplerCreateInfo.cs +++ b/Ryujinx.Graphics.GAL/SamplerCreateInfo.cs @@ -61,7 +61,7 @@ namespace Ryujinx.Graphics.GAL AddressMode.ClampToEdge, AddressMode.ClampToEdge, CompareMode.None, - GAL.CompareOp.Always, + CompareOp.Always, new ColorF(0f, 0f, 0f, 0f), 0f, 0f, diff --git a/Ryujinx.Graphics.Gpu/Shader/ShaderSpecializationState.cs b/Ryujinx.Graphics.Gpu/Shader/ShaderSpecializationState.cs index 872aaf67c..b0d77d8ae 100644 --- a/Ryujinx.Graphics.Gpu/Shader/ShaderSpecializationState.cs +++ b/Ryujinx.Graphics.Gpu/Shader/ShaderSpecializationState.cs @@ -110,7 +110,7 @@ namespace Ryujinx.Graphics.Gpu.Shader /// /// Texture target. /// - public Image.TextureTarget TextureTarget; + public TextureTarget TextureTarget; /// /// Indicates if the coordinates used to sample the texture are normalized or not (0.0..1.0 or 0..Width/Height). @@ -331,7 +331,7 @@ namespace Ryujinx.Graphics.Gpu.Shader int cbufSlot, uint format, bool formatSrgb, - Image.TextureTarget target, + TextureTarget target, bool coordNormalized) { Box state = GetOrCreateTextureSpecState(stageIndex, handle, cbufSlot); @@ -415,7 +415,7 @@ namespace Ryujinx.Graphics.Gpu.Shader /// Shader stage where the texture is used /// Offset in words of the texture handle on the texture buffer /// Slot of the texture buffer constant buffer - public Image.TextureTarget GetTextureTarget(int stageIndex, int handle, int cbufSlot) + public TextureTarget GetTextureTarget(int stageIndex, int handle, int cbufSlot) { return GetTextureSpecState(stageIndex, handle, cbufSlot).Value.TextureTarget; } diff --git a/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs b/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs index 54b00708b..819ece416 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs @@ -10,8 +10,6 @@ using static Spv.Specification; namespace Ryujinx.Graphics.Shader.CodeGen.Spirv { - using SpvInstruction = Spv.Generator.Instruction; - static class Declarations { // At least 16 attributes are guaranteed by the spec. @@ -60,7 +58,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv for (int funcIndex = 0; funcIndex < functions.Count; funcIndex++) { StructuredFunction function = functions[funcIndex]; - SpvInstruction[] locals = new SpvInstruction[function.InArguments.Length]; + Instruction[] locals = new Instruction[function.InArguments.Length]; for (int i = 0; i < function.InArguments.Length; i++) { @@ -122,7 +120,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv context.SharedMemory = DeclareMemory(context, StorageClass.Workgroup, size); } - private static SpvInstruction DeclareMemory(CodeGenContext context, StorageClass storage, int size) + private static Instruction DeclareMemory(CodeGenContext context, StorageClass storage, int size) { var arrayType = context.TypeArray(context.TypeU32(), context.Constant(context.TypeU32(), size)); var pointerType = context.TypePointer(storage, arrayType); diff --git a/Ryujinx.Graphics.Vulkan/BufferHolder.cs b/Ryujinx.Graphics.Vulkan/BufferHolder.cs index 6288f16fb..055d6a59a 100644 --- a/Ryujinx.Graphics.Vulkan/BufferHolder.cs +++ b/Ryujinx.Graphics.Vulkan/BufferHolder.cs @@ -272,7 +272,7 @@ namespace Ryujinx.Graphics.Vulkan _gd, cbs.CommandBuffer, dstBuffer, - BufferHolder.DefaultAccessFlags, + DefaultAccessFlags, AccessFlags.TransferWriteBit, PipelineStageFlags.AllCommandsBit, PipelineStageFlags.TransferBit, @@ -294,7 +294,7 @@ namespace Ryujinx.Graphics.Vulkan cbs.CommandBuffer, dstBuffer, AccessFlags.TransferWriteBit, - BufferHolder.DefaultAccessFlags, + DefaultAccessFlags, PipelineStageFlags.TransferBit, PipelineStageFlags.AllCommandsBit, dstOffset, @@ -319,7 +319,7 @@ namespace Ryujinx.Graphics.Vulkan gd, cbs.CommandBuffer, dstBuffer, - BufferHolder.DefaultAccessFlags, + DefaultAccessFlags, AccessFlags.TransferWriteBit, PipelineStageFlags.AllCommandsBit, PipelineStageFlags.TransferBit, @@ -335,7 +335,7 @@ namespace Ryujinx.Graphics.Vulkan cbs.CommandBuffer, dstBuffer, AccessFlags.TransferWriteBit, - BufferHolder.DefaultAccessFlags, + DefaultAccessFlags, PipelineStageFlags.TransferBit, PipelineStageFlags.AllCommandsBit, dstOffset, diff --git a/Ryujinx.Graphics.Vulkan/DescriptorSetUpdater.cs b/Ryujinx.Graphics.Vulkan/DescriptorSetUpdater.cs index 9564d7ebc..9ac2e61de 100644 --- a/Ryujinx.Graphics.Vulkan/DescriptorSetUpdater.cs +++ b/Ryujinx.Graphics.Vulkan/DescriptorSetUpdater.cs @@ -97,7 +97,7 @@ namespace Ryujinx.Graphics.Vulkan _dummyBuffer = gd.BufferManager.Create(gd, 0x10000, forConditionalRendering: false, deviceLocal: true); } - _dummyTexture = gd.CreateTextureView(new GAL.TextureCreateInfo( + _dummyTexture = gd.CreateTextureView(new TextureCreateInfo( 1, 1, 1, diff --git a/Ryujinx.Graphics.Vulkan/DisposableBufferView.cs b/Ryujinx.Graphics.Vulkan/DisposableBufferView.cs index 28ddd7ddb..e81ca412e 100644 --- a/Ryujinx.Graphics.Vulkan/DisposableBufferView.cs +++ b/Ryujinx.Graphics.Vulkan/DisposableBufferView.cs @@ -3,7 +3,7 @@ using System; namespace Ryujinx.Graphics.Vulkan { - readonly struct DisposableBufferView : System.IDisposable + readonly struct DisposableBufferView : IDisposable { private readonly Vk _api; private readonly Device _device; diff --git a/Ryujinx.Graphics.Vulkan/PipelineLayoutFactory.cs b/Ryujinx.Graphics.Vulkan/PipelineLayoutFactory.cs index e4e2d3349..96b3b3b1c 100644 --- a/Ryujinx.Graphics.Vulkan/PipelineLayoutFactory.cs +++ b/Ryujinx.Graphics.Vulkan/PipelineLayoutFactory.cs @@ -86,7 +86,7 @@ namespace Ryujinx.Graphics.Vulkan iter++; } - DescriptorSetLayout[] layouts = new DescriptorSetLayout[PipelineFull.DescriptorSetLayouts]; + DescriptorSetLayout[] layouts = new DescriptorSetLayout[PipelineBase.DescriptorSetLayouts]; var uDescriptorSetLayoutCreateInfo = new DescriptorSetLayoutCreateInfo() { @@ -117,10 +117,10 @@ namespace Ryujinx.Graphics.Vulkan BindingCount = (uint)iCount }; - gd.Api.CreateDescriptorSetLayout(device, uDescriptorSetLayoutCreateInfo, null, out layouts[PipelineFull.UniformSetIndex]).ThrowOnError(); - gd.Api.CreateDescriptorSetLayout(device, sDescriptorSetLayoutCreateInfo, null, out layouts[PipelineFull.StorageSetIndex]).ThrowOnError(); - gd.Api.CreateDescriptorSetLayout(device, tDescriptorSetLayoutCreateInfo, null, out layouts[PipelineFull.TextureSetIndex]).ThrowOnError(); - gd.Api.CreateDescriptorSetLayout(device, iDescriptorSetLayoutCreateInfo, null, out layouts[PipelineFull.ImageSetIndex]).ThrowOnError(); + gd.Api.CreateDescriptorSetLayout(device, uDescriptorSetLayoutCreateInfo, null, out layouts[PipelineBase.UniformSetIndex]).ThrowOnError(); + gd.Api.CreateDescriptorSetLayout(device, sDescriptorSetLayoutCreateInfo, null, out layouts[PipelineBase.StorageSetIndex]).ThrowOnError(); + gd.Api.CreateDescriptorSetLayout(device, tDescriptorSetLayoutCreateInfo, null, out layouts[PipelineBase.TextureSetIndex]).ThrowOnError(); + gd.Api.CreateDescriptorSetLayout(device, iDescriptorSetLayoutCreateInfo, null, out layouts[PipelineBase.ImageSetIndex]).ThrowOnError(); fixed (DescriptorSetLayout* pLayouts = layouts) { @@ -128,7 +128,7 @@ namespace Ryujinx.Graphics.Vulkan { SType = StructureType.PipelineLayoutCreateInfo, PSetLayouts = pLayouts, - SetLayoutCount = PipelineFull.DescriptorSetLayouts + SetLayoutCount = PipelineBase.DescriptorSetLayouts }; gd.Api.CreatePipelineLayout(device, &pipelineLayoutCreateInfo, null, out layout).ThrowOnError(); @@ -191,7 +191,7 @@ namespace Ryujinx.Graphics.Vulkan Set(iLayoutBindings, DescriptorType.StorageImage, ref iIndex, shader.Bindings.ImageBindings); } - DescriptorSetLayout[] layouts = new DescriptorSetLayout[PipelineFull.DescriptorSetLayouts]; + DescriptorSetLayout[] layouts = new DescriptorSetLayout[PipelineBase.DescriptorSetLayouts]; var uDescriptorSetLayoutCreateInfo = new DescriptorSetLayoutCreateInfo() { @@ -221,10 +221,10 @@ namespace Ryujinx.Graphics.Vulkan BindingCount = (uint)iCount }; - gd.Api.CreateDescriptorSetLayout(device, uDescriptorSetLayoutCreateInfo, null, out layouts[PipelineFull.UniformSetIndex]).ThrowOnError(); - gd.Api.CreateDescriptorSetLayout(device, sDescriptorSetLayoutCreateInfo, null, out layouts[PipelineFull.StorageSetIndex]).ThrowOnError(); - gd.Api.CreateDescriptorSetLayout(device, tDescriptorSetLayoutCreateInfo, null, out layouts[PipelineFull.TextureSetIndex]).ThrowOnError(); - gd.Api.CreateDescriptorSetLayout(device, iDescriptorSetLayoutCreateInfo, null, out layouts[PipelineFull.ImageSetIndex]).ThrowOnError(); + gd.Api.CreateDescriptorSetLayout(device, uDescriptorSetLayoutCreateInfo, null, out layouts[PipelineBase.UniformSetIndex]).ThrowOnError(); + gd.Api.CreateDescriptorSetLayout(device, sDescriptorSetLayoutCreateInfo, null, out layouts[PipelineBase.StorageSetIndex]).ThrowOnError(); + gd.Api.CreateDescriptorSetLayout(device, tDescriptorSetLayoutCreateInfo, null, out layouts[PipelineBase.TextureSetIndex]).ThrowOnError(); + gd.Api.CreateDescriptorSetLayout(device, iDescriptorSetLayoutCreateInfo, null, out layouts[PipelineBase.ImageSetIndex]).ThrowOnError(); fixed (DescriptorSetLayout* pLayouts = layouts) { @@ -232,7 +232,7 @@ namespace Ryujinx.Graphics.Vulkan { SType = StructureType.PipelineLayoutCreateInfo, PSetLayouts = pLayouts, - SetLayoutCount = PipelineFull.DescriptorSetLayouts + SetLayoutCount = PipelineBase.DescriptorSetLayouts }; gd.Api.CreatePipelineLayout(device, &pipelineLayoutCreateInfo, null, out layout).ThrowOnError(); diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs index 609bba1ed..74068ad66 100644 --- a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs +++ b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs @@ -157,7 +157,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati int supportedLanguages = (int)context.Device.Application.ControlData.Value.SupportedLanguageFlag; int firstSupported = BitOperations.TrailingZeroCount(supportedLanguages); - if (firstSupported > (int)SystemState.TitleLanguage.BrazilianPortuguese) + if (firstSupported > (int)TitleLanguage.BrazilianPortuguese) { Logger.Warning?.Print(LogClass.ServiceAm, "Application has zero supported languages"); @@ -170,7 +170,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati // TODO: In the future, a GUI could enable user-specified search priority if (((1 << (int)context.Device.System.State.DesiredTitleLanguage) & supportedLanguages) == 0) { - SystemLanguage newLanguage = Enum.Parse(Enum.GetName(typeof(SystemState.TitleLanguage), firstSupported)); + SystemLanguage newLanguage = Enum.Parse(Enum.GetName(typeof(TitleLanguage), firstSupported)); desiredLanguageCode = SystemStateMgr.GetLanguageCode((int)newLanguage); Logger.Info?.Print(LogClass.ServiceAm, $"Application doesn't support configured language. Using {newLanguage}"); diff --git a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs index 970aab958..d812e3741 100644 --- a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs @@ -901,7 +901,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs [CommandHipc(606)] public ResultCode GetRightsId(ServiceCtx context) { - LibHac.Ncm.StorageId storageId = (LibHac.Ncm.StorageId)context.RequestData.ReadInt64(); + StorageId storageId = (StorageId)context.RequestData.ReadInt64(); ProgramId programId = context.RequestData.ReadStruct(); Result result = _baseFileSystemProxy.Get.GetRightsId(out RightsId rightsId, programId, storageId); diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneContentManager.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneContentManager.cs index 4c9886942..f4b3a9590 100644 --- a/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneContentManager.cs +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneContentManager.cs @@ -130,7 +130,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone } List<(int Offset, string Location, string Abbr)> outList = new List<(int Offset, string Location, string Abbr)>(); - var now = System.DateTimeOffset.Now.ToUnixTimeSeconds(); + var now = DateTimeOffset.Now.ToUnixTimeSeconds(); using (IStorage ncaStorage = new LocalStorage(_virtualFileSystem.SwitchPathToSystemPath(tzBinaryContentPath), FileAccess.Read, FileMode.Open)) using (IFileSystem romfs = new Nca(_virtualFileSystem.KeySet, ncaStorage).OpenFileSystem(NcaSectionType.Data, _fsIntegrityCheckLevel)) { diff --git a/Ryujinx.Tests.Unicorn/UnicornAArch32.cs b/Ryujinx.Tests.Unicorn/UnicornAArch32.cs index 8b3e79b69..3b8c1699e 100644 --- a/Ryujinx.Tests.Unicorn/UnicornAArch32.cs +++ b/Ryujinx.Tests.Unicorn/UnicornAArch32.cs @@ -122,14 +122,14 @@ namespace Ryujinx.Tests.Unicorn { if (!_isDisposed) { - Interface.Checked(Native.Interface.uc_close(uc)); + Interface.Checked(Interface.uc_close(uc)); _isDisposed = true; } } public void RunForCount(ulong count) { - Interface.Checked(Native.Interface.uc_emu_start(uc, this.PC, 0xFFFFFFFFFFFFFFFFu, 0, count)); + Interface.Checked(Interface.uc_emu_start(uc, this.PC, 0xFFFFFFFFFFFFFFFFu, 0, count)); } public void Step() @@ -222,7 +222,7 @@ namespace Ryujinx.Tests.Unicorn { byte[] data = new byte[4]; - Interface.Checked(Native.Interface.uc_reg_read(uc, (int)register, data)); + Interface.Checked(Interface.uc_reg_read(uc, (int)register, data)); return (uint)BitConverter.ToInt32(data, 0); } diff --git a/Ryujinx.Tests.Unicorn/UnicornAArch64.cs b/Ryujinx.Tests.Unicorn/UnicornAArch64.cs index 5cd5f88cb..1784e7dff 100644 --- a/Ryujinx.Tests.Unicorn/UnicornAArch64.cs +++ b/Ryujinx.Tests.Unicorn/UnicornAArch64.cs @@ -111,14 +111,14 @@ namespace Ryujinx.Tests.Unicorn { if (!_isDisposed) { - Interface.Checked(Native.Interface.uc_close(uc)); + Interface.Checked(Interface.uc_close(uc)); _isDisposed = true; } } public void RunForCount(ulong count) { - Interface.Checked(Native.Interface.uc_emu_start(uc, this.PC, 0xFFFFFFFFFFFFFFFFu, 0, count)); + Interface.Checked(Interface.uc_emu_start(uc, this.PC, 0xFFFFFFFFFFFFFFFFu, 0, count)); } public void Step() @@ -241,7 +241,7 @@ namespace Ryujinx.Tests.Unicorn { byte[] data = new byte[8]; - Interface.Checked(Native.Interface.uc_reg_read(uc, (int)register, data)); + Interface.Checked(Interface.uc_reg_read(uc, (int)register, data)); return (ulong)BitConverter.ToInt64(data, 0); } diff --git a/Ryujinx/Modules/Updater/UpdateDialog.cs b/Ryujinx/Modules/Updater/UpdateDialog.cs index a1556713a..4957b681b 100644 --- a/Ryujinx/Modules/Updater/UpdateDialog.cs +++ b/Ryujinx/Modules/Updater/UpdateDialog.cs @@ -32,7 +32,7 @@ namespace Ryujinx.Modules _mainWindow = mainWindow; _buildUrl = buildUrl; - Icon = new Gdk.Pixbuf(Assembly.GetAssembly(typeof(ConfigurationState)), "Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png"); + Icon = new Pixbuf(Assembly.GetAssembly(typeof(ConfigurationState)), "Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png"); MainText.Text = "Do you want to update Ryujinx to the latest version?"; SecondaryText.Text = $"{Program.Version} -> {newVersion}"; diff --git a/Ryujinx/Modules/Updater/Updater.cs b/Ryujinx/Modules/Updater/Updater.cs index ded126208..194d35e53 100644 --- a/Ryujinx/Modules/Updater/Updater.cs +++ b/Ryujinx/Modules/Updater/Updater.cs @@ -293,7 +293,7 @@ namespace Ryujinx.Modules list[index] = args.Result; Interlocked.Increment(ref completedRequests); - if (Interlocked.Equals(completedRequests, ConnectionCount)) + if (Equals(completedRequests, ConnectionCount)) { byte[] mergedFileBytes = new byte[_buildSize]; for (int connectionIndex = 0, destinationOffset = 0; connectionIndex < ConnectionCount; connectionIndex++) diff --git a/Ryujinx/Program.cs b/Ryujinx/Program.cs index 3baddca3f..403dde300 100644 --- a/Ryujinx/Program.cs +++ b/Ryujinx/Program.cs @@ -151,7 +151,7 @@ namespace Ryujinx // Initialize SDL2 driver SDL2Driver.MainThreadDispatcher = action => { - Gtk.Application.Invoke(delegate + Application.Invoke(delegate { action(); }); @@ -282,7 +282,7 @@ namespace Ryujinx ? GraphicsBackend.Vulkan : GraphicsBackend.OpenGl; - ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath); + ConfigurationState.Instance.ToFileFormat().SaveConfig(ConfigurationPath); } Application.Run(); diff --git a/Ryujinx/Ui/RendererWidgetBase.cs b/Ryujinx/Ui/RendererWidgetBase.cs index 576d2d121..9dabe8173 100644 --- a/Ryujinx/Ui/RendererWidgetBase.cs +++ b/Ryujinx/Ui/RendererWidgetBase.cs @@ -132,7 +132,7 @@ namespace Ryujinx.Ui private void HideCursorStateChanged(object sender, ReactiveEventArgs state) { - Gtk.Application.Invoke(delegate + Application.Invoke(delegate { _hideCursorOnIdle = state.NewValue; @@ -248,7 +248,7 @@ namespace Ryujinx.Ui && keyboard.IsPressed(Key.Enter)) || keyboard.IsPressed(Key.Escape); - bool fullScreenToggled = ParentWindow.State.HasFlag(Gdk.WindowState.Fullscreen); + bool fullScreenToggled = ParentWindow.State.HasFlag(WindowState.Fullscreen); if (toggleFullscreen != _toggleFullscreen) { @@ -340,7 +340,7 @@ namespace Ryujinx.Ui string directory = AppDataManager.Mode switch { AppDataManager.LaunchMode.Portable => System.IO.Path.Combine(AppDataManager.BaseDirPath, "screenshots"), - _ => System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyPictures), "Ryujinx") + _ => System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "Ryujinx") }; string path = System.IO.Path.Combine(directory, filename); @@ -434,7 +434,7 @@ namespace Ryujinx.Ui if (_ticks >= _ticksPerFrame) { string dockedMode = ConfigurationState.Instance.System.EnableDockedMode ? "Docked" : "Handheld"; - float scale = Graphics.Gpu.GraphicsConfig.ResScale; + float scale = GraphicsConfig.ResScale; if (scale != 1) { dockedMode += $" ({scale}x)";