mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-10-08 21:11:39 +00:00
Merge pull request #1126 from levzzz5154/fix/nvapi-dxgi-recursion
Fix dxvk-nvapi recursion in IdentifyGpu::queryNvapi (fixes #1101)
This commit is contained in:
1 file changed
+6
@@ -194,6 +194,12 @@ std::vector<GpuInformation> IdentifyGpu::checkGpuInfo()
|
||||
|
||||
void IdentifyGpu::queryNvapi(GpuInformation& gpuInfo)
|
||||
{
|
||||
// Prevent recursion: NvAPI_Initialize (dxvk-nvapi) internally creates a DXGI factory
|
||||
// and enumerates adapters, which re-enters our hooked EnumAdapters/EnumAdapters1 and
|
||||
// calls getAllGpus() again while is_fetching is already set (returns empty list).
|
||||
// Skip the DXGI load checks so nvapi sees the real adapters, allowing init to succeed.
|
||||
ScopedSkipDxgiLoadChecks skipDxgiLoadChecks {};
|
||||
|
||||
auto nvapiModule = NtdllProxy::LoadLibraryExW_Ldr(L"nvapi64.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
|
||||
|
||||
// No nvapi, should not be nvidia, possibly external spoofing
|
||||
|
||||
Reference in new issue
Block a user