mirror of
https://github.com/rehan-remade/universal-modder.git
synced 2026-11-05 01:37:40 +00:00
[PR #97] [MERGED] feat(win): warn when Windows Auto HDR is on for the captured game #121
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rehan-remade/universal-modder#121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rehan-remade/universal-modder/pull/97
Author: @AltDoug
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/6/2026
Merged by: @rehan-remade
Base:
main← Head:feat/auto-hdr-warning📝 Commits (2)
fe2b2c0feat(win): warn when Windows Auto HDR is on for the captured game6fc3053Merge main into feat/auto-hdr-warning📊 Changes
5 files changed (+77 additions, -0 deletions)
View changed files
📝
.agents/skills/game-automation/SKILL.md(+3 -0)📝
.claude/skills/game-automation/SKILL.md(+3 -0)📝
skills/game-automation/SKILL.md(+3 -0)📝
tests/test_um.py(+13 -0)📝
um/win.py(+55 -0)📄 Description
On a Windows HDR display with Auto HDR on for an SDR game,
um win shotandum win recordcome out washed out: 2-3x brighter and cyan-shifted. One measured pixel went from (2, 74, 87) in the game to (20, 168, 192) in the capture. An agent judging colours or art from those shots gets it wrong, and there's no hint why. Plenty of people with HDR monitors have Auto HDR on.This PR doesn't try to tone-map. It detects the setting and says what to do:
auto_hdr_on(exe)readsHKCU\Software\Microsoft\DirectX\UserGpuPreferences: the game's own entry (matched by exe name), elseDirectXUserGlobalSettings. An oddAutoHDREnablemeans on (Windows writes 2097 for on, 2096 for off). Under WSL it usesreg.exe query.shotandrecordprint one warning line to stderr with the Settings path to turn it off. Nothing else changes.With Auto HDR off for the game, a plain 8-bit gfxcapture frame matched the game's own internal screenshot at 90.99 dB PSNR, so turning it off fixes the capture without any HDR pipeline.
Tests: new
test_auto_hdr_detection(fails before, passes after); full suite 59 passed on Windows 11, Python 3.12. By hand against the real registry: a game set to 2097 prints the warning, a game set to 2096 captures with no warning.Found and fixed with AI assistance (Claude Code); the repro and the fix were run by hand on Windows 11.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.