Skip to content

Set HiDPI=false in Godot project settings#939

Merged
ajhalme merged 1 commit into
C7-Game:Developmentfrom
ajhalme:mac-scale
Jun 14, 2026
Merged

Set HiDPI=false in Godot project settings#939
ajhalme merged 1 commit into
C7-Game:Developmentfrom
ajhalme:mac-scale

Conversation

@ajhalme

@ajhalme ajhalme commented May 30, 2026

Copy link
Copy Markdown
Contributor

I picked up a second hand 2022 MacBook Air the other day. The laptop boasts a high-DPI "Liquid Retina" display: "13.6-inch (diagonal) LED-backlit display with IPS technology; 2560x1664 native resolution at 224 pixels per inch"

OpenCiv3's Godot project settings for displays default to high-DPI being enabled, which when debugging in Godot (via Rider) results in a tiny game window, as the pixels render in true size. Setting high-DPI off gives a more useful game window, as Godot will scale things up in a reasonable way. (There are additional scaling settings to tweak, but just this one change is a big help.)

I suspect this fixes #876 and possibly #868 as well, though confirming this would require a release build or more testing with different hardware. My guess is that this flag will determine the NSHighResolutionCapable flag on Mac builds -- see workaround #876 (comment) -- but to confirm I'll first have to figure out how Mac builds work.

Before

Compare Rider's menu text and OpenCiv3 status box text sizes.
Screenshot 2026-05-30 at 01 13 30

After

Screenshot 2026-05-30 at 00 52 54

@stavrosfa

Copy link
Copy Markdown
Contributor

I can't verify this, if you feel this is an overall improvement and doesn't break anything else, feel free to merge this.

It's a small enough change to track anyway

@ajhalme

ajhalme commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Looking at the build output binary of a local OpenCiv3 Mac build with an without window/dpi/allow_hidpi=false set, my understanding is that Godot does NOT set the NSHighResolutionCapable in the app's Info.plist to false on allow_hidpi=false.

As such, with this patch, I believe Godot itself does the scaling at runtime.

While this fix doesn't work in the expected way, it does work - the allow_hidpi=false setting makes the built app render in a more useful way, so I'm merging this in.

Godot has additional scaling settings we can explore another time. These include the scaling mode and integer scaling vs fractional scaling - the configuration after this patch is the best one of the ones I tried. Also worth noting that more recent versions of Godot change the scaling defaults, so we may be forced to revisit this in the future as we upgrade Godot versions.

I'll be adding references to this PR and the reported issue on this new wiki page: https://github.com/C7-Game/OpenCiv3/wiki/MacOS-Support

@ajhalme ajhalme merged commit 9a32cd6 into C7-Game:Development Jun 14, 2026
3 checks passed
@ajhalme ajhalme deleted the mac-scale branch June 14, 2026 21:18
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.

When in full-screen mode, each component does not fit properly[Mac M1]

2 participants