SDL2 Android: Issue rotating screen with software renderer |
a1studmuffin
|
An update: I'm able to reproduce the problem in the testdrawchessboard.c sample using Mercurial tip code (as of Tuesday February 14th 2017), if I change the renderer creation lines (around line 110) from:
to:
Using the original code, when I launch the Android app, I can rotate the screen and the chessboard rotates as expected. Using the modified code, rotating the screen causes everything to go black (excluding the Android nav bar) until I relaunch the app. My understanding was that either method for creating the software renderer should be fine, but perhaps I'm mistaken? |
|||||||||||||||
|
a1studmuffin
|
I will take this silence as speechlessness... but wait, the plot thickens!
I've discovered the testdrawchessboard.c sample is actually broken on Android, at least in my environment (latest SDL2 source from Mercurial, Android 7.0 (SDK 24), Android NDK 13.1). Once the screen rotates, the software renderer no longer updates the screen, but it does keep the last image it rendered hanging around. (As mentioned in the last post, with the second render method I mentioned above, it results in a black screen.) I believe this bug has gone unnoticed because the DrawChessboard method draws a static image, so it's entirely not obvious when the software renderer breaks and appears as if the sample is working. If you modify this line in DrawChessboard() from:
to
it will turn the chessboard into a disco floor, and it will become obvious when the renderer stops updating the screen. |
|||||||||||||||
|