- Various ifdefs for __ANDROID__ in the kegs 'core'
- Addition of android_driver.c and android_sound_driver.c
Application structure:
- The UI is coordinated via KegsMain
- There is a KegsView$KegsThread class that gets its own thread. This thread ends up calling mainLoop() in jni/android_driver.c and running KEGS in that thread.
- The native thread gets two things from Java:
-- a Bitmap
-- a ConcurrentLinkedQueue
All UI events are sent to the native thread by pushing events into the ConcurrentLinkedQueue (KegsEvent, MouseKegsEvent, KeyKegsEvent).
The native thread pulls events off the queue, writes updates into the bitmap object, then calls the Java "updateScreen" in the KegsView$KegsThread object.
The native thread also calls support functions in Java, such as checkForPause(), which deadlocks the thread while it should be paused.