[v69] DeviceWidth/DeviceHeight are 0 on iOS 5.1

Monkey Forums/Monkey Bug Reports/[v69] DeviceWidth/DeviceHeight are 0 on iOS 5.1

Steven(Posted 2013) [#1]
Tested on an iPad with 5.1.1 and in the simulator.
I get 0 for DeviceWidth and DeviceHeight.

v69 btw, the forum doesn't like [ and ] in the title :)

Edit:
The bug(?) happens when I access DeviceWidth/DeviceHeight from the OnCreate method in my
app. When I moved the logic to the OnUpdate method it works fine.


Xaron(Posted 2013) [#2]
Well I assume that during OnCreate not everything is initialized correctly yet, so I would never rely on that stuff during OnCreate...


marksibly(Posted 2013) [#3]
DeviceWidth/Height *should* be correct in OnCreate - will take a look.


MikeHart(Posted 2013) [#4]
I was reporting this error a while ago and you fixed it. Not sure for which version you fixed it.


marksibly(Posted 2013) [#5]
Looks like this *is* happening again!

Fixed for next release.


EdzUp(Posted 2013) [#6]
I also got strange results when using the devicewidth and deviceheight in fullscreen glfw compiled with mingw on version 70 will up to 70c and see if it helps :-)

with 70c I get the correct results :)


arawkins(Posted 2013) [#7]
I'm still having problems with this on v70d. DeviceWidth and DeviceHeight are working again, but they seem to be ignoring retina resolutions. I get 320x480 on my retina ipod touch, whereas I used to get 640x960. I've tried setting #IOS_RETINA_ENABLED to both true and false but it has no effect.


arawkins(Posted 2013) [#8]
v70e fixed it, thanks Mark!


marksibly(Posted 2013) [#9]
> v70e fixed it, thanks Mark!

Yay!

This stuff's a bit fiddly because view setup is performed differently on different versions of iOS.