Page 1 of 1

Love2d not starting in portrait mode on Android

Posted: Fri Oct 25, 2019 9:42 pm
by loustak
Hello,

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:

Code: Select all

        <activity
            android:configChanges="orientation|screenSize"
            android:label="Cadence"
            android:launchMode="singleTop"
            android:name="org.love2d.android.GameActivity"
            android:screenOrientation="sensorPortrait"
        >
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...

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.