[v69] DeviceWidth/DeviceHeight are 0 on iOS 5.1
Monkey Forums/Monkey Bug Reports/[v69] DeviceWidth/DeviceHeight are 0 on iOS 5.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. | 
| 
 | ||
| Well I assume that during OnCreate not everything is initialized correctly yet, so I would never rely on that stuff during OnCreate... | 
| 
 | ||
| DeviceWidth/Height *should* be correct in OnCreate - will take a look. | 
| 
 | ||
| I was reporting this error a while ago and you fixed it. Not sure for which version you fixed it. | 
| 
 | ||
| Looks like this *is* happening again! Fixed for next release. | 
| 
 | ||
| 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 :) | 
| 
 | ||
| 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. | 
| 
 | ||
| v70e fixed it, thanks Mark! | 
| 
 | ||
| > v70e fixed it, thanks Mark! Yay! This stuff's a bit fiddly because view setup is performed differently on different versions of iOS. |