Love2d not starting in portrait mode on Android

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
loustak
Prole
Posts: 2
Joined: Thu Jun 01, 2017 7:47 am

Love2d not starting in portrait mode on Android

Post 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.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], slime and 14 guests