De-duplicate and simplify enum naming.
This commit is contained in:
parent
32628bb8a3
commit
7e3f6af6c6
2 changed files with 9 additions and 9 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue