Skip to content

Conversation

@IriySoft
Copy link

Fix for the issue:
#1983

Short: Lime doesn't respond to the pixel ratio change that may happen in runtime, for example, when the user zooms the browser window with a running HTML5 app in Chrome with Ctrl +/-.

@joshtynjala
Copy link
Member

If we make this change, we should possibly also add some kind of event to Window to indicate to developers that the scale has changed. They may need to switch textures or do other re-init in response. With that in mind, this will need to go into a feature release. Probably 8.4, so that it has more time for testing too.

When we switch to SDL3 for native targets in Lime 9, we can dispatch the same event when we respond to pixel ratio changes indicated by its C++ event.

@IriySoft
Copy link
Author

IriySoft commented Sep 25, 2025

If we make this change, we should possibly also add some kind of event to Window to indicate to developers that the scale has changed. They may need to switch textures or do other re-init in response. With that in mind, this will need to go into a feature release. Probably 8.4, so that it has more time for testing too.

I believe this could be fired by OnResize, then the developer can check pixel ratio manually.

I don't think that the zoom issue happens often - most probably no one even noticed :) There is one case when it can be noticed: according to the report from the QA team of Crazy Games portal, the games become blurry when switched to full screen on Chromebook - most probably when it happens, pixel ratio is changed.

@player-03 player-03 changed the title Issue fix: https://github.com/openfl/lime/issues/1983 (runtime pixel ratio check) [HTML5] Respond to pixel ratio changes Oct 22, 2025
@player-03 player-03 changed the base branch from develop to 8.4.0-dev October 22, 2025 22:50
@IriySoft IriySoft closed this Oct 28, 2025
@IriySoft
Copy link
Author

Need to check the fresh changes in main project :))

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