AltimitSystems / mv-android-client

RPG Maker MV unofficial Android client
http://www.hbgames.org/forums/viewtopic.php?f=48&t=79391
Apache License 2.0
115 stars 36 forks source link

Black flicker then black screen on some Android TV devices #15

Closed jfogell closed 5 years ago

jfogell commented 5 years ago

Hello FelixJones - First off - I am a big fan of your work! I wanted to get your take on an issue I am trying to resolve.

I am experiencing the following problem with mv-android-client (I am using your latest client):

On certain Android TV devices, the title screen comes up but them immediately starts flickering black (or whatever color I have set the background to) and then stays black (or whatever color background is set to). I still can control the game, start it, etc, but I can not see anything (I can hear audio just fine). If I shut off hardware acceleration, this problem does not occur (but then performance is reduced to make the game almost un-playable).

I have found that the problem occurs on the following devices (even with a brand new project with only one event, no plugins, custom assets, etc.): Mi Box 3, Mi Box S, Amazon Firestick, Second Generation Amazon Fire TV Stick

This problem does not occur on: Amazon Fire TV Stick 4K, Amazon Fire TV Cube, Nvidia Shield

At first I thought it was Android version related, but alas, the Mi Box 3 recently upgraded to Android 8 and the problem still occurs (while Amazon Fire TV Cube is based on FireOS 6.0 which is based on Android 7.1 and the problem does not occur there). I am guessing it is hardware related - and maybe specific to the lower end or older Android TV devices?

Here is what I tried to fix it (but alas, I was unsuccessful): 1) Just about everything I found on google: (https://stackoverflow.com/questions/9476151/webview-flashing-with-white-background-if-hardware-acceleration-is-enabled-an): a) Changing the background color to transparent b) Hiding the view until it is completely loaded 2) Changing the screen orientation from sensorLandscape to Landscape (on the theory that you can't rotate a TV :-))

I am going to keep trying to resolve this (time for some and fun:-)), but I want to know if you had any suggestions? Any ideas that you might have for what may be causing this or ideas on what I could try to fix the problem would be very helpful!

jfogell commented 5 years ago

I have more information on the issue. After pouring through spec documents for the devices that have and don't have this issue, I noticed that the devices that run Open GL 2.0 seem to have the problem. Devices that run Open GL 3.1 or higher don't seem to have the problem. The problem is unrelated to hardware acceleration (shutting off hardware acceleration I guess forced canvas which worked around issue?). If I leave hardware acceleration on and just force Canvas if Open GL version is less than 3, everything works great. I even get a good frame rate with Canvas! (Maybe because of this?: https://developers.google.com/web/updates/2012/07/Taking-advantage-of-GPU-acceleration-in-the-2D-canvas). This problem can be closed, but I wanted to document it in case anyone else runs into it.