It seems that I have found a strange bug on Android. I have set in my manifest to start the game in portrait mode as follow:
But for some reason the game is draw strangely like if it had some offset or something. When I quit the game and reopen it (without closing the application) the game now draw correctly on my phone...
Code: Select all
<activity android:configChanges="orientation|screenSize" android:label="Cadence" android:launchMode="singleTop" android:name="org.love2d.android.GameActivity" android:screenOrientation="sensorPortrait" >
My draw functions are intensiviely using the love.graphics.getDimension() function , I suspect that it returns inccorect result before switching to portrait but I'm not able to provide a proof for this... Also, all my drawing code is inside a push / pop transform. The bug doesn't appear on Linux.
Any idea how to solve this problem? Thanks.