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

window.get_size() return unreliable value when changing screen resolution #8825

Open
baochungit opened this issue Apr 22, 2024 · 0 comments
Open
Labels
android Issue related to the Android platform bug Something is not working as expected engine Issues related to the Defold engine

Comments

@baochungit
Copy link

Describe the bug (REQUIRED)
When changing screen resolution on Android phone, I see the window.get_size() returns unreliable value.
On WFHD+, app in portrait mode, I've got the window height sometimes 3040 (the correct value) and mostly 2280.
On FHD+, app in portrait mode, I've got the window height sometimes 1710 and mostly 2280 (the correct value).

To Reproduce (REQUIRED)
Steps to reproduce the behavior:

  1. Create a minimum project with a label showing the current window height
  2. Build & run it on an Android phone (mine is Samsung Galaxy Note 10 Plus)
  3. On the phone, open Settings -> Display -> Screen Resolution and change to the resolution we want
    fc9c2f771f10bba27955bbb37edc0d3d1a55db26_2_354x750
  4. Reopen the app to see its window height

Expected behavior (REQUIRED)
Get the right window size value, should be equal to screen resolution.

Defold version (REQUIRED):

  • Version 1.7.0

Platforms (REQUIRED):

  • Platforms: Android
  • OS: Android 12
  • Device: Samsung Galaxy Note 10 Plus
@baochungit baochungit added the bug Something is not working as expected label Apr 22, 2024
@britzl britzl added android Issue related to the Android platform engine Issues related to the Defold engine labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Issue related to the Android platform bug Something is not working as expected engine Issues related to the Defold engine
Projects
None yet
Development

No branches or pull requests

2 participants