Compare commits

...

8 Commits

Author SHA1 Message Date
3fe482b943 Merge pull request #3 from Marterich/blueswill-refactor
Blueswill refactor for performance and readability
2024-06-27 17:12:26 +00:00
b52aa945b7 Merge branch 'gpu-whitelist' into blueswill-refactor 2024-06-27 19:03:28 +02:00
8b3d2274d3 Change Date to allow for easy merge 2024-06-27 18:56:49 +02:00
e91937c9d9 Refactor @blueswills changes 2024-06-27 18:55:20 +02:00
9233d934d3 Merge pull request #2 from og-mrk/function-improvement/invoke-winutilgpu-2024-06-27
Re-Formate 'Invoke-WinUtilGPU.ps1' Private Function to be Shorter
2024-06-27 04:01:45 +00:00
a75020f211 Re-Formate 'Invoke-WinUtilGPU.ps1' Private Function to be Shorter 2024-06-27 03:04:22 +03:00
cf6b4bdf3a Update Invoke-WinUtilGPU.ps1 2024-06-27 06:34:32 +08:00
84fe65001b Compile Winutil 2024-06-26 13:30:26 +00:00

View File

@ -1,29 +1,21 @@
function Invoke-WinUtilGPU {
$gpuInfo = Get-CimInstance Win32_VideoController
foreach ($gpu in $gpuInfo) {
$gpuName = $gpu.Name
if ($gpuName -like "*NVIDIA*") {
return $true # NVIDIA GPU found
}
}
# GPUs to blacklist from using Demanding Theming
$lowPowerGPUs = (
"*NVIDIA GeForce*M*",
"*NVIDIA GeForce*Laptop*",
"*NVIDIA GeForce*GT*",
"*AMD Radeon(TM)*",
"*UHD*"
)
foreach ($gpu in $gpuInfo) {
$gpuName = $gpu.Name
if ($gpuName -like "*AMD Radeon RX*") {
return $true # AMD GPU Found
foreach ($gpuPattern in $lowPowerGPUs){
if ($gpu.Name -like $gpuPattern) {
return $false
}
}
foreach ($gpu in $gpuInfo) {
$gpuName = $gpu.Name
if ($gpuName -like "*UHD*") {
return $false # Intel Intergrated GPU Found
}
}
foreach ($gpu in $gpuInfo) {
$gpuName = $gpu.Name
if ($gpuName -like "*AMD Radeon(TM)*") {
return $false # AMD Intergrated GPU Found
}
}
return $true
}