Incorrect content drawing on Android for landscape-mode, but only sometimes and it’s very difficult to reproduce this issue.
So sometimes when the user returns to the application I start to show content like for portrait mode (but app designed only for landscape).
There is a sample:
https://monosnap.com/file/V6PgvvpwSWuBAMVZton5mXfYJAiU3H
Also application stop response for any click-events.
And there is only one way I found how can I reproduce this issue:
-
Create empty cpp-project for cocos2d-x 3.16
-
At the method
bool AppDelegate::applicationDidFinishLaunching()
paste next line beforereturn true;
cocos2d::log("FrameSize is [%f] [%f]", glview->getFrameSize().width, glview->getFrameSize().height );
If build application normally and start it - in the log I see:
FrameSize is [2009.000000] [1080.000000]
(this is correct)
- Lock phone and build+launch application while phone locked (I used Android Studio 2)
After app launched I see next message in the log:
FrameSize is [1080.000000] [2009.000000]
And result showed on the screen before.
Also application stop response for any click-events.
PS: I found how to reproduce issue only today, but had this problem more than 1 year before (for example when I used cocos2d-x 3.11)
PS2: I used Samsung Galaxy S8, but also had some problem on Samsung Galaxy S7, S3