Skip to content

Add Battle.net's DPI to fresh prefixes on launch - #18286

Merged
ryanrhughes merged 2 commits into
quattrofrom
battlenet-dpi-fresh-prefix
Nov 9, 2026
Merged

ryanrhughes merged 2 commits into
quattrofrom
battlenet-dpi-fresh-prefix

Conversation

@ryanrhughes

Copy link
Copy Markdown
Collaborator

On a fresh Battle.net install, #17418 doesn't scale anything; the launcher still opens at 100% on a HiDPI monitor. Wine reads the DPI from LogPixels under [Control Panel\\Desktop], and a new prefix doesn't have that value. The launch script only rewrote LogPixels lines that already existed, so all it touched was the copy under [Software\\Wine\\Fonts], which Wine writes on startup but never reads. Wine set it right back to 96.

It worked on my first machine only because I'd already run reg add there by hand, which created the [Control Panel\\Desktop] value. The test fixture had that value too, so it passed.

omarchy-launch-battlenet now adds LogPixels to [Control Panel\\Desktop] when it's missing, right after the key's #time= line, and still updates existing values the same as before.

Verified

  • bash test/shell.d/launch-battlenet-test.sh: 3 of 3 pass. The new "adds the DPI to a fresh prefix" case fails against the current script.
  • Ran the launcher against a copy of a fresh prefix's user.reg at scale 2. The only changes were the new "LogPixels"=dword:000000c0 line under [Control Panel\\Desktop] and the Fonts copy going from 96 to 192.

Wine reads LogPixels from [Control Panel\\Desktop], which a new prefix doesn't
have, so rewriting only existing values left Battle.net at 100%.
@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the shared-output problem is fixed.

Summary

The PR adds the missing LogPixels value under [Control Panel\\Desktop] so fresh Battle.net installs use the focused monitor's scale.

  • Battle.net starts with the monitor-matched DPI in fresh prefixes.

Reviews (2) · Last reviewed commit: "Give each Battle.net launch its own regi..." · Reviewed by Greptile

Comment thread bin/omarchy-launch-battlenet Resolved
@ryanrhughes
ryanrhughes merged commit 29f3bb6 into quattro Nov 9, 2026
3 checks passed
@ryanrhughes
ryanrhughes deleted the battlenet-dpi-fresh-prefix branch November 9, 2026 19:01
ryanrhughes added a commit that referenced this pull request Nov 9, 2026
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 9, 2026
Wine reads LogPixels from [Control Panel\\Desktop], which a new prefix doesn't have, so rewriting only existing values left Battle.net at 100%. Each launch also writes its own temp file now, so two quick launches can't share one.
omarchybot added a commit to Bartok9/omarchy that referenced this pull request Nov 17, 2026
quattro added DPI matching to omarchy-launch-battlenet (omacom#17418, omacom#18286) and a launch-battlenet-test.sh of its own. The DPI match now runs only on the path that actually launches, so focusing an open window or refusing a windowless tree leaves user.reg alone. The guard's tests join quattro's file in its style: a real windowless process stands in for the hidden tree, so pgrep is no longer stubbed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant