De-duplicate and simplify enum naming.

This commit is contained in:
MutantAura 2024-04-21 16:53:57 +01:00
parent 32628bb8a3
commit 7e3f6af6c6
2 changed files with 9 additions and 9 deletions

View file

@ -8,16 +8,16 @@ namespace Ryujinx.Common.GraphicsDriver.NVAPI
enum OglThreadControl : uint enum OglThreadControl : uint
{ {
OglThreadControlDefault = 0, Default = 0,
OglThreadControlEnable = 1, Enabled = 1,
OglThreadControlDisable = 2, Disabled = 2,
} }
// Only present in driver versions >= 526.47 // Only present in driver versions >= 526.47
enum OglCplDxPresent : uint enum OglCplDxPresent : uint
{ {
OglCplPreferDxPresentDisable = 0, Disabled = 0,
OglCplPreferDxPresentEnable = 1, Enabled = 1,
OglCplPreferDxPresentDefault = 2, Default = 2,
} }
} }

View file

@ -136,9 +136,9 @@ namespace Ryujinx.Common.GraphicsDriver
uint targetValue = id switch uint targetValue = id switch
{ {
NvapiSettingId.OglThreadControlId => (uint)(enabled ? OglThreadControl.OglThreadControlEnable : OglThreadControl.OglThreadControlDisable), NvapiSettingId.OglThreadControlId => (uint)(enabled ? OglThreadControl.Enabled : OglThreadControl.Disabled),
NvapiSettingId.OglCplPreferDxPresentId => (uint)(enabled ? OglCplDxPresent.OglCplPreferDxPresentEnable : OglCplDxPresent.OglCplPreferDxPresentDisable), NvapiSettingId.OglCplPreferDxPresentId => (uint)(enabled ? OglCplDxPresent.Enabled : OglCplDxPresent.Disabled),
_ => throw new ArgumentException($"Invalid NVAPI setting id: {id}"), _ => throw new ArgumentException($"Invalid NVAPI setting id: 0x{id:X}"),
}; };
NvdrsSetting setting = new() NvdrsSetting setting = new()