From 7e3f6af6c6181082261e3c254796fb138f69e609 Mon Sep 17 00:00:00 2001 From: MutantAura Date: Sun, 21 Apr 2024 16:53:57 +0100 Subject: [PATCH] De-duplicate and simplify enum naming. --- src/Ryujinx.Common/GraphicsDriver/NVAPI/Nvapi.cs | 12 ++++++------ src/Ryujinx.Common/GraphicsDriver/NVDriverHelper.cs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Ryujinx.Common/GraphicsDriver/NVAPI/Nvapi.cs b/src/Ryujinx.Common/GraphicsDriver/NVAPI/Nvapi.cs index 8030bec5b..525510e9f 100644 --- a/src/Ryujinx.Common/GraphicsDriver/NVAPI/Nvapi.cs +++ b/src/Ryujinx.Common/GraphicsDriver/NVAPI/Nvapi.cs @@ -8,16 +8,16 @@ namespace Ryujinx.Common.GraphicsDriver.NVAPI enum OglThreadControl : uint { - OglThreadControlDefault = 0, - OglThreadControlEnable = 1, - OglThreadControlDisable = 2, + Default = 0, + Enabled = 1, + Disabled = 2, } // Only present in driver versions >= 526.47 enum OglCplDxPresent : uint { - OglCplPreferDxPresentDisable = 0, - OglCplPreferDxPresentEnable = 1, - OglCplPreferDxPresentDefault = 2, + Disabled = 0, + Enabled = 1, + Default = 2, } } diff --git a/src/Ryujinx.Common/GraphicsDriver/NVDriverHelper.cs b/src/Ryujinx.Common/GraphicsDriver/NVDriverHelper.cs index 6fca32608..d0c4b5f90 100644 --- a/src/Ryujinx.Common/GraphicsDriver/NVDriverHelper.cs +++ b/src/Ryujinx.Common/GraphicsDriver/NVDriverHelper.cs @@ -136,9 +136,9 @@ namespace Ryujinx.Common.GraphicsDriver uint targetValue = id switch { - NvapiSettingId.OglThreadControlId => (uint)(enabled ? OglThreadControl.OglThreadControlEnable : OglThreadControl.OglThreadControlDisable), - NvapiSettingId.OglCplPreferDxPresentId => (uint)(enabled ? OglCplDxPresent.OglCplPreferDxPresentEnable : OglCplDxPresent.OglCplPreferDxPresentDisable), - _ => throw new ArgumentException($"Invalid NVAPI setting id: {id}"), + NvapiSettingId.OglThreadControlId => (uint)(enabled ? OglThreadControl.Enabled : OglThreadControl.Disabled), + NvapiSettingId.OglCplPreferDxPresentId => (uint)(enabled ? OglCplDxPresent.Enabled : OglCplDxPresent.Disabled), + _ => throw new ArgumentException($"Invalid NVAPI setting id: 0x{id:X}"), }; NvdrsSetting setting = new()