Skip to content

Conversation

@stemsteamcoder
Copy link

Disabled setRetinaScaling() lines:

window.size *= 2 # TBD: Double the Viewport size?
window.move_to_center()

because window was being set to double the intended size and an unintended position.

To be honest, I don't know what this function is meant to do, so I don't know if I'm breaking something important.

Disabled setRetinaScaling() lines:

window.size *= 2 # TBD: Double the Viewport size?
window.move_to_center()

because window was being set to double the intended size and an unintended position.
@ShinryakuTako
Copy link
Member

ShinryakuTako commented Nov 23, 2025

setRetinaScaling() has if DisplayServer.has_feature(DisplayServer.FEATURE_HIDPI) which means a 2x scale display, like Retina Macs.

Without the scaling the pixels become too tiny and more of the "level" is visible than intended.

I still haven't fully figured out how to keep the window/viewport scaling/positioning voodoo consistent across all displays 😖

It seems to work differently on different setups, like a MacBook's builtin display (which I develop on) vs a 1080p TV, and also differently on web. Lemme take a look at the other lines like window.content_scale_factor = 2.0 etc.

For now you can edit that function to whatever suits your game until I find something that works on all displays.

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.

2 participants