Skip to content

Commit

Permalink
fix: further improve brightness detection
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Nov 28, 2023
1 parent 78329be commit 1f4eebb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/playbook/Executables/FINALIZE.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ if "%diskDrive%" == "SSD" (
)

:: Disable brightness slider service if it's not supported on the current display
powershell -nop -c "Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightnessMethods" | find "Not supported" > nul && (
call %windir%\AtlasModules\Scripts\setSvc.cmd DisplayEnhancementService 4
)
powershell -nop -c "if ((Get-Computerinfo).CsPCSystemType -eq 'Desktop') { exit 532 }"
if errorlevel 532 set disableBright=true
powershell -nop -c "Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightnessMethods" | find "Not supported" > nul || set disableBright=false
if "%disableBright%"=="true" call %windir%\AtlasModules\Scripts\setSvc.cmd DisplayEnhancementService 4

0 comments on commit 1f4eebb

Please sign in to comment.