Android TV devices don't have menu buttons. Remotes should have a play/pause
button (which may send individual play and pause events rather than a
combined event) and gamepads should have a Y button. Use these to open the
menu.
The AAssets API was added in android 2.3, so it also requires using
the android-9 toolchain.
Using this gives a rather large speedboost to starting the ScummVM
application.
As the virtual keyboard trigger has been moved to CTRL-F7, the previous
code which generates a unmodified F7 event to do this will not work.
However, due to the complexity of this code, directly calling the
virtual keyboard trigger event could have side effects, so have instead
just added the CTRL modifier to fix this.
This should be fixed if possible to use EVENT_VIRTUAL_KEYBOARD.
Since the Android backend uses glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA)
we need to make the transparent cursor pixels all 0 otherwise we might get
artifacts from blending.
getAxisValue() is only present from Android 3.1 onwards and
usage causes a runtime failure on earlier versions of Android.
This bug was introduced by a50ede20 with addition of OUYA support.
This solution is as recommended on the Android developer portal.
setSurface is done in a different thread than the one that starts
the scummvm main. The main thread would then wait until the setSurface
thread notifies. The setSurface thread would notify before it actually
calls setSurface, meaning if the thread is preemted before calling
setSurface, initSurface will assert, causing the app to crash.
Overlays with alpha channel in ScummVM use pre-multiplied alpha.
Thus, is it necessary to set the source blend function to ONE, not
SOURCE_ALPHA.
While there is no firm decision on the texture format to be used to
cursors, make sure to set the key color to R=G=B=A=0.0, so that it
can be used with either pre-multiplied or non-pre-multiplied blending.
The vanilla android toolchain even is unhappy when unknown folders are
present in the resources directory, so have moved the ouya specific
resources out to another directory.
The aapt throws an "invalid resource directory name" if the
resource directory name is not known to the tools. Unfortunately,
"values-television" is an OUYA specific addition and thus breaks
with the standard vanilla Android toolchain.