Retry Vangogh GPU detection 3 times

This commit is contained in:
Kamil Trzciński 2022-11-23 10:30:13 +01:00
parent 7b3884c86b
commit 00e60e72ba
2 changed files with 7 additions and 1 deletions

View file

@ -20,7 +20,12 @@ namespace PowerControl
if (Settings.Default.EnableExperimentalFeatures)
{
Instance.WithGlobalMutex(1000, () => VangoghGPU.Detect());
for (int i = 0; !VangoghGPU.IsSupported; i++)
{
Instance.WithGlobalMutex(1000, () => VangoghGPU.Detect());
if (VangoghGPU.IsSupported)
Thread.Sleep(300);
}
}
// To customize application configuration such as set high DPI settings or default font,