Compare commits

...

5 Commits

Author SHA1 Message Date
Justawildwolf
3fe482b943
Merge pull request #3 from Marterich/blueswill-refactor
Blueswill refactor for performance and readability
2024-06-27 17:12:26 +00:00
Martin Wiethan
b52aa945b7
Merge branch 'gpu-whitelist' into blueswill-refactor 2024-06-27 19:03:28 +02:00
Martin Wiethan
8b3d2274d3 Change Date to allow for easy merge 2024-06-27 18:56:49 +02:00
Martin Wiethan
e91937c9d9 Refactor @blueswills changes 2024-06-27 18:55:20 +02:00
Marterich
84fe65001b Compile Winutil 2024-06-26 13:30:26 +00:00

View File

@ -2,23 +2,20 @@ function Invoke-WinUtilGPU {
$gpuInfo = Get-CimInstance Win32_VideoController $gpuInfo = Get-CimInstance Win32_VideoController
# GPUs to blacklist from using Demanding Theming # GPUs to blacklist from using Demanding Theming
foreach ($gpu in $gpuInfo) { $lowPowerGPUs = (
$gpuName = $gpu.Name "*NVIDIA GeForce*M*",
if ($gpuName -like "*NVIDIA GeForce*M*" -OR "*NVIDIA GeForce*Laptop*",
$gpuName -like "*NVIDIA GeForce*Laptop*" -OR "*NVIDIA GeForce*GT*",
$gpuName -like "*NVIDIA GeForce*GT*" -OR "*AMD Radeon(TM)*",
$gpuName -like "*AMD Radeon(TM)*" -OR "*UHD*"
$gpuName -like "*UHD*") { )
return $false
}
}
# GPUs to whitelist on using Demanding Theming
foreach ($gpu in $gpuInfo) { foreach ($gpu in $gpuInfo) {
$gpuName = $gpu.Name foreach ($gpuPattern in $lowPowerGPUs){
if ($gpuName -like "*NVIDIA*" -OR if ($gpu.Name -like $gpuPattern) {
$gpuName -like "*AMD Radeon RX*") { return $false
return $true }
} }
} }
return $true
} }