[SDL] Porting to Android: NDK strategies, etc.

jlunderville jlunder at catfish.dhs.org
Wed Jul 28 16:02:53 PDT 2010


In case it's not clear, if I do end up working a different porting strategy, I'd like to get my code back into the SDL mainline so everyone can benefit (and I'm not alone in maintaining it...).

Specifically it seemed to me that for compatibility, it would be desirable to run the audio, input, and haptics through JNI. A little tedious, but very straightforward. I heard people talk about an SDL_mobile API for handling save/restore state, which seems like a great idea too.

I had an idea that it should be possible to make use of the GLSurfaceView by running an extra thread for the app's main() and etc.; it starts up suspended, and gets woken up every time onDrawFrame is called. When it's done rendering, the flip() function puts the thread back to sleep and wakes the GLSurfaceView up (I'd actually want to implement this using something like setcontext() to avoid poking the kernel unnecessarily, but hopefully you get the gist).

Any comments on either of these? Am I just overthinking the problem?




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20100728/5a43ec5e/attachment-0008.htm>


More information about the SDL mailing list