Window.get_size() return unreliable value on WQHD+ resolution

It’s strange that I used to see it returned the correct value for the first time app running on WQHD+ resolution. After switching back to FHD+ and then it seems just return the value of FHD+ for WQHD+

I’m testing on my Android device Note 10 plus.

What do you mean? Changing display? Are you connecting to some external screen? Could you share some more details? Script, logs? :wink:

I mean changing screen resolution in Settings like this

It’s strange, when I change to WQHD+, sometimes I got 2280 height, sometimes 3040. Switching to FHD+, sometimes 1710, sometimes 2280.
These unreliable value causes my layout a bit skewed.

My case is: I want to avoid putting stuff in Cutout area so I decided to add a padding on top. The padding should equal the cutout height.
I can get Cutout Height via extension. It always return correct value: 85 on FHD+ and 113 on WQHD+.
However the window.get_size() which I use to calculate scaling factor seems return unreliable value (maybe it’s current rendered size?). It makes the padding top is sometimes wrong (yes, it’s sometimes. sometimes it’s correct and I can put my stuff right under cutout area).

Weird. I also didn’t know there was a setting to switch resolution like that. Which brand of phone is that?

Samsung. Changing resolution can be useful sometimes for example when you use with a VR glasses

Ok, thanks. We have a brand new Samsung phone I can try with. Could you please create a ticket on GitHub?

Here it is window.get_size() return unreliable value when changing screen resolution · Issue #8825 · defold/defold (github.com)

Thanks for taking your time! From what I see, somehows the app window size isn’t always reflected the same value with screen resolution.