Skip to content

Commit f155094

Browse files
committed
Improve SpecialKope support
1 parent 4cb2110 commit f155094

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

OptiScaler/misc/IdentifyGpu.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,14 @@ std::vector<GpuInformation> IdentifyGpu::getAllGpus()
344344
static std::vector<GpuInformation> cache = []() { return checkGpuInfo(); }();
345345
skip = false;
346346

347+
// Retry getting the GPU info in case it failed
348+
static std::mutex mutex;
349+
if (cache.size() == 0 || (cache.size() > 0 && cache[0].deviceId == VendorId::Invalid))
350+
{
351+
std::scoped_lock lock(mutex);
352+
cache = checkGpuInfo();
353+
}
354+
347355
return cache;
348356
}
349357

0 commit comments

Comments
 (0)