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.
If ant is let loose on backends/platform/android it copies everything it can into the final apk file, which we obviously don't want. This changes it so that it will only see the java files which it compiles puts the results into the apk.
Touching and holding the left side of the screen functions as a
joystick.
Swiping the middle side allows fine control over arrow keys (eg.
dialogues), tapping it sends an enter key.
Swiping the right side up/down sends pageup/pagedown.
Android NDK 5 and SDK 7 (Android 2.1) are needed to provide full multitouch support. Otherwise MotionEvent.getPointerCount() and MotionEvent.getX(int) are not available.
In addition GLES2 headers are only available in Android 2.1 and newer revisions.
Do not compress zip-files added to the apk archive. This is very slow on android 2.3 devices if the zip-file is big (e.g. modern.zip theme) and devices with android < 2.3 do not support assets with an uncompressed size greater than 1 MB at all.
As most zip-file entries (like themes) are just stored and not compressed, zip-file assets are recompressed before adding them to the apk to avoid wasting space.
- controls in non-mouse mode:
- use the touchpad borders as arrow keys
- double tap on one of the borders triggers run mode
- tap into the center area triggers the use-action (ENTER)
- double-tap into the center area triggers the lookat-action ('u')
- long press into the center area shows inventory in grim ('i')
- a fling in the center area skips the current sentence ('.')
TODO: Instead of hardcoding the keys, they should be mapped later.
Note that passing events from onTouch() to the GestureListener does not seem to work correctly (most double-taps are ignored). Instead onTouchEvent() is used now which worked much better with the GestureListener.