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

Weird distortion/scaling with non-standard screen resolution #9805

Closed
2 tasks done
mtcfk opened this issue May 4, 2024 · 2 comments
Closed
2 tasks done

Weird distortion/scaling with non-standard screen resolution #9805

mtcfk opened this issue May 4, 2024 · 2 comments
Labels

Comments

@mtcfk
Copy link

mtcfk commented May 4, 2024

Platforms

Windows

Build

release build 146

Issue

When using non-standard screen resolution, 2560x1600 px in my case, the game doesnt seem to scale properly. On first launch, it seems to simply launch in 1080p stretched across the full screen which isnt ideal and causes lower level of detail but its not anything major. When alt-tabbing in and out of the game is where it gets really annoying - the cursor alignment becomes way off after doing so (this most likely makes this a duplicate of #8267 although im hoping that since I now most likely know the cause unlike the previous person, it might be possible to do something about it) and the improper scaling even seems to affect completely different apps or system UI at times (though this doesnt happen consistently)

Im using Windows 11 with display scaling in Windows settings set to 150%. The issue does not seem to persist when display scaling in Windows is set to 100%. (Keeping it that way is not an option as it makes everything else (not related to Mindustry in any way) tiny). UI settling in Mindustry has no effect on any of this. I guess that either the scaling in windows is not taken into consideration or that the screen resolution isnt detected correctly.

Untitled.mp4

I also recorded video of the issue with OBS but strangely, it looks a bit different on video then on screen. Namely, unlike in the video, the game is actually stretched across almost the whole screen (stays the same size as the starting screen/animation)

Steps to reproduce

  1. Have a screen with non-standard resolution over 1080p (admittedly a pretty major prerequisite, might not be required (?))
  2. Set display scale in Windows (Settings>Display>Scale) to a number greater than 100%
  3. Launch the game
  4. Alt-tab in and out of the game to see the larger issues, possibly with another app open on fullscreen to see if its affected (for example Davinci Resolve in my case, "zoomed in" with no way to get it back except relaunch)
    Snímek obrazovky 2024-05-04 014114

Mods used

No response

Save file

No response

(Crash) logs

No response

Submission

  • I have updated to the latest release (https://github.com/Anuken/Mindustry/releases) to make sure my issue has not been fixed.
  • I have searched the closed and open issues to make sure that this problem has not already been reported.
@mtcfk mtcfk added the bug label May 4, 2024
@Anuken
Copy link
Owner

Anuken commented May 4, 2024

Might be fixed in c2500b2, or not. I don't have a monitor in a non-standard resolution (or a windows development setup...), so I can't test this.

Mindustry uses the window size/cursor position that the SDL library reports, and doesn't handle display scale or anything of that nature at all. Changing the way display scaling works may break the game for everyone else, so this "fix" (if it works at all) may very well get reverted later.

@Anuken Anuken closed this as completed May 4, 2024
@mtcfk
Copy link
Author

mtcfk commented May 4, 2024

Thank you. I do realise the issue is already closed, but in case the fix doesnt help, I found that right clicking Mindustry.exe, selecting "Compatibility", "Run Compatibility Troubleshooter" and following the prompts on the screen as shown in the attached screenshot fixes the issue.

image

Im just saying this in case someone with the same problem stumbles across this issue or if the problem becomes more common since modern laptops often feature non-standard screen resolution nowadays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants