Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wrong scaling on hidpi screens in emscripten #71436

Merged
merged 2 commits into from
Feb 3, 2024

Conversation

nornagon
Copy link
Contributor

@nornagon nornagon commented Feb 2, 2024

Summary

None

Purpose of change

Without this, the game only takes up the top-left 1/4 of the screen on high-dpi screens.

Describe the solution

Removing the "ALLOW_HIGHDPI" flag would be bad on non-Web builds because it would give you a blurry window (I think?). But on the web, we force the rendering to be simple 2x scale without blurring using image-rendering: pixelated, so this isn't a problem—we just pretend we don't have a highdpi window :)

Describe alternatives you've considered

Testing

Tested by downloading the CI artifact, serving it locally with npx serve and loading the game on a high-dpi screen.

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 2, 2024
@nornagon nornagon marked this pull request as ready for review February 2, 2024 20:31
@akrieger akrieger merged commit 50a9093 into CleverRaven:master Feb 3, 2024
36 of 40 checks passed
nornagon pushed a commit to nornagon/Cataclysm-DDA that referenced this pull request Jun 7, 2024
fix wrong scaling on hidpi screens in emscripten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants