[SOLVED] different values returned by 'safeScreenOriginY' in the same device (simulator)

My point is simple:
I’m testing my project in the simulator with the iPhone 4S skin. The value returned by display.safeScreenOriginY in ‘main.lua’ is 42.666667938232, the same display.safeScreenOriginY return 0 in the first scene of my project. I don’t overwrite the value.

Of course most dimensions will differ based on your device selection…
Whatever you set in config.lua file will return the same value for a few commands like

display.contentWidth
display.contentHeight

but

display.actualContentWidth
display.actualContentHeight

for example will return values based on current selected device

and many other methods like safe area methods and viewable area methods …etc.

Hey @kakula, you should to read again my post. I know what you say. I’m testing my project on the same Device skin (iPhone 4S). The point is that the value returned in my ‘main.lua’ file differ from the value returned in the first scene of my project.

I tried it out on Windows 10 with version 2022.3666 but couldn’t replicate the issue. Here is the sample project:

sample.zip (1.2 KB)

You may want to share your sample code so we can replicate the issue as well.

Thank you @bgmadclown
I’ve tested your sample and it works fine. So after review my code again, I founded that the command display.setStatusBar(display.HiddenStatusBar) affect the value of display.safeScreenOriginY. I use this command in my ‘main.lua’ file. That’s the origin of the issue.

I think the documentation should add that display.setStatusBar(display.HiddenStatusBar) affects the value of display.safeScreenOriginY.