mirror of https://github.com/ppy/osu
Merge pull request #30560 from smoogipoo/fix-nvapi
Fix incorrectly translated NVAPI ABI
This commit is contained in:
commit
e20163652e
|
@ -258,11 +258,9 @@ private static bool createProfile(out IntPtr profileHandle)
|
||||||
Version = NvProfile.Stride,
|
Version = NvProfile.Stride,
|
||||||
IsPredefined = 0,
|
IsPredefined = 0,
|
||||||
ProfileName = PROFILE_NAME,
|
ProfileName = PROFILE_NAME,
|
||||||
GPUSupport = new uint[32]
|
GpuSupport = NvDrsGpuSupport.Geforce
|
||||||
};
|
};
|
||||||
|
|
||||||
newProfile.GPUSupport[0] = 1;
|
|
||||||
|
|
||||||
if (checkError(CreateProfile(sessionHandle, ref newProfile, out profileHandle), nameof(CreateProfile)))
|
if (checkError(CreateProfile(sessionHandle, ref newProfile, out profileHandle), nameof(CreateProfile)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -463,9 +461,7 @@ internal struct NvProfile
|
||||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = NVAPI.UNICODE_STRING_MAX)]
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = NVAPI.UNICODE_STRING_MAX)]
|
||||||
public string ProfileName;
|
public string ProfileName;
|
||||||
|
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
public NvDrsGpuSupport GpuSupport;
|
||||||
public uint[] GPUSupport;
|
|
||||||
|
|
||||||
public uint IsPredefined;
|
public uint IsPredefined;
|
||||||
public uint NumOfApps;
|
public uint NumOfApps;
|
||||||
public uint NumOfSettings;
|
public uint NumOfSettings;
|
||||||
|
@ -611,6 +607,7 @@ internal enum NvStatus
|
||||||
SYNC_NOT_ACTIVE = -194, // The requested action cannot be performed without Sync being enabled.
|
SYNC_NOT_ACTIVE = -194, // The requested action cannot be performed without Sync being enabled.
|
||||||
SYNC_MASTER_NOT_FOUND = -195, // The requested action cannot be performed without Sync Master being enabled.
|
SYNC_MASTER_NOT_FOUND = -195, // The requested action cannot be performed without Sync Master being enabled.
|
||||||
INVALID_SYNC_TOPOLOGY = -196, // Invalid displays passed in the NV_GSYNC_DISPLAY pointer.
|
INVALID_SYNC_TOPOLOGY = -196, // Invalid displays passed in the NV_GSYNC_DISPLAY pointer.
|
||||||
|
|
||||||
ECID_SIGN_ALGO_UNSUPPORTED = -197, // The specified signing algorithm is not supported. Either an incorrect value was entered or the current installed driver/hardware does not support the input value.
|
ECID_SIGN_ALGO_UNSUPPORTED = -197, // The specified signing algorithm is not supported. Either an incorrect value was entered or the current installed driver/hardware does not support the input value.
|
||||||
ECID_KEY_VERIFICATION_FAILED = -198, // The encrypted public key verification has failed.
|
ECID_KEY_VERIFICATION_FAILED = -198, // The encrypted public key verification has failed.
|
||||||
FIRMWARE_OUT_OF_DATE = -199, // The device's firmware is out of date.
|
FIRMWARE_OUT_OF_DATE = -199, // The device's firmware is out of date.
|
||||||
|
@ -749,4 +746,12 @@ internal enum NvThreadControlSetting : uint
|
||||||
OGL_THREAD_CONTROL_NUM_VALUES = 2,
|
OGL_THREAD_CONTROL_NUM_VALUES = 2,
|
||||||
OGL_THREAD_CONTROL_DEFAULT = 0
|
OGL_THREAD_CONTROL_DEFAULT = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
internal enum NvDrsGpuSupport : uint
|
||||||
|
{
|
||||||
|
Geforce = 1 << 0,
|
||||||
|
Quadro = 1 << 1,
|
||||||
|
Nvs = 1 << 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue