This is my first time commenting here and it’s my first openfl app. I set up a listener on stage resizing and resize my stuff accordingly. And if I change the orientation, it looks right, however many times I do it. However, it sometimes looks wrong on startup until I tilt the screen. It looks like it was drawn for the opposite orientation, then squished down to fit the orientation it’s in (e.g., if it starts in wide, it will have a miniature version of the fullscreen squished off to the side).
When I do native or neko, I don’t experience this issue. I don’t have an android to test to see if it happens on android yet.
No ideas? Okay, it looks like I described it a little wrong. It’s more like it just looks scaled down. So if I’m in landscape orientation, it starts up landscape but just way too small off to the corner. I saw in the pong tutorial that you’re supposed to wait a bit before drawing:
But I tried this and it’s still starting up. I even tried increasing the timeout before it draws and still no dice. Any ideas? This is like the main bug between me being able to submit this to the app store.
If I add that to my resize function, it always shows the correct value, but I also see that it doesn’t automatically call it on startup. Only after I tilt my screen. Also, if I add that to the constructor of Main, it still shows the right value.
haxelib upgrade fixed it. Weird. I only started coding in haxe on this computer a few weeks ago, so I was unlucky enough to start when there was a bug in the lib apparently. So yeah, resize wasn’t being called until after the upgrade.
I think this was due to an issue where we improved our retina support in Lime, but the OpenFL fix didn’t make it in the matching release for some reason. It should be consistent now