-
Notifications
You must be signed in to change notification settings - Fork 441
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
LÖVE 12 seems to incorrectly interpret the window size #2128
Comments
Which OS are you using, and how old is your copy of love 12? If you're on Windows and use a screen with a non-100% display scale, high dpi support on Windows is currently slightly broken but significantly less broken compared to before this change from yesterday. |
I am on windows 11, and my copy of LÖVE 12 is from two days ago, so before this commit. My screen is indeed high DPI with 150% display scale. I'll pull your last commit later this evening and see if the issue is fixed. |
Seems like this didn't fit the issue, although getDimensions now return a smaller value. Enregistrement.de.l.ecran.2024-12-18.180651.mp4Not only that, my own pixel art game, which uses a low-res Canvas to render its sprites, now looks horrendous because of non-integer scaling, even when I specifically scale the concerned Canvas. Is this normal ? If it is, is there anything specific I need to do to fix this? |
Set the dpiscale settings field in newCanvas to 1, or set love 12 doesn't currently support low-dpi on Windows (or Android in both love 11 and love 12). |
That being said, you're always going to have to deal with non-integer scaling in some form if you have an arbitrary window size and you want a pixel art game to entirely fill the window rather than clamping to an integer scale factor. |
I meant "when I specifically scale the concerned Canvas to an integer size"
Fair enough. My game already has an option to only scale the pixel art integer sizes; my point being that this didn't happen before love 12. 😅
This seemed to work. Slightly annoying that I now has to purposefully add in this in order for it to not look ugly, but no big deal 😅 Thanks! |
re this:
love 12's high dpi support is still in progress (because SDL3 significantly changed how things work on Windows). We may introduce emulated low dpi support to make it match iOS/macOS/Wayland, we might tweak how high dpi situations behave, and/or we might make it more clear what you need to do in various situations. That being said...
It would do the same thing on Android in love 11 no matter what, and also on macOS/iOS on love 11 if you opt into high dpi there. On windows in love 11 it would look blurry no matter what, because love didn't support any high dpi at all there. |
LÖVE 12 seems to incorrectly interpret the window size if it is resized right after launch, before love.load is even ran. The video below shows a minimal reproducible example, which is a game splash screen. Seems like the dimensions returned by
love.graphics.getDimensions()
are correct, but when objects are drawn onto the screen, they are squished and incorrectly sized. I'd like to note that this is not the case in LÖVE 11.5, the blue rectangle correctly takes up the whole screen.Enregistrement.de.l.ecran.2024-12-18.104220_compr.mp4
Here's the code from the example above:
The text was updated successfully, but these errors were encountered: