[PR #97] [MERGED] feat(win): warn when Windows Auto HDR is on for the captured game #121

Closed
opened 2026-10-15 20:53:34 +00:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • fe2b2c0 feat(win): warn when Windows Auto HDR is on for the captured game
  • 6fc3053 Merge 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 shot and um win record come 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) reads HKCU\Software\Microsoft\DirectX\UserGpuPreferences: the game's own entry (matched by exe name), else DirectXUserGlobalSettings. An odd AutoHDREnable means on (Windows writes 2097 for on, 2096 for off). Under WSL it uses reg.exe query.
  • shot and record print one warning line to stderr with the Settings path to turn it off. Nothing else changes.
  • A bullet in the game-automation skill (all three copies).

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.

## 📋 Pull Request Information **Original PR:** https://github.com/rehan-remade/universal-modder/pull/97 **Author:** [@AltDoug](https://github.com/AltDoug) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/6/2026 **Merged by:** [@rehan-remade](https://github.com/rehan-remade) **Base:** `main` ← **Head:** `feat/auto-hdr-warning` --- ### 📝 Commits (2) - [`fe2b2c0`](https://github.com/rehan-remade/universal-modder/commit/fe2b2c0a8b2dc944f7264414c2d2122583ef58fa) feat(win): warn when Windows Auto HDR is on for the captured game - [`6fc3053`](https://github.com/rehan-remade/universal-modder/commit/6fc30533b658fbb43853dac8d2ddfa590dfdcac1) Merge main into feat/auto-hdr-warning ### 📊 Changes **5 files changed** (+77 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.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) </details> ### 📄 Description On a Windows HDR display with Auto HDR on for an SDR game, `um win shot` and `um win record` come 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)` reads `HKCU\Software\Microsoft\DirectX\UserGpuPreferences`: the game's own entry (matched by exe name), else `DirectXUserGlobalSettings`. An odd `AutoHDREnable` means on (Windows writes 2097 for on, 2096 for off). Under WSL it uses `reg.exe query`. - `shot` and `record` print one warning line to stderr with the Settings path to turn it off. Nothing else changes. - A bullet in the game-automation skill (all three copies). 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](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 20:53:34 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rehan-remade/universal-modder#121
No description provided.