Hi,
I’ve been chasing a strange bug in my app for a while, which i can only verify on somebody elses iphone 7 plus, but I guess the issue is the same for all “plus” iphones. The reported video mode is incorrect.
I have chased it down to this commit:
which (correctly I assume) changes the size of the opengl renderer to match the final resolution (1920x1080) of the plus phones, avoiding one extra scaling step.
However, the same logic is also applied to the reported video modes (in points), which will lead to values that are too big, e.g. 846x476 instead of 736x414.
This will only become an issue if you are actually using these values somehow, which is what I’m doing. I compare these values with the “safe layout area” that was introduced in ios 11 (which is relevant for the iphone X). But due to the invalid values from the video mode, I’m drawing the wrong conclusions.
I propose to remove the “nativeScale” use in case of the computation/reporting of video modes.
Note that the iphone simulator will not help understanding/debugging/fixing the issue, because it’s “nativeScale” property for the “plus” phones is the same as the “scale” property, e.g. “3” - while on a real phone it is somewhere around “2.609”.
Regards,
Daniel