Journal Integration for OLPCGames (inotify (save) and a command line argument (open)?)


Just implemented the Journal API for OLPCGames. A serious mess in there, it's a synchronous call where the filename passed will be deleted, so handling it in the asynchronous Pygame environment means I'm having to block the GTK event loop until the Pygame event loop retires the event. Which meant I needed to introduce the idea of "retiring" an event into the Pygame event loop. I also wound up having to add some shutdown/cleanup code to allow the save-on-close semantics to work properly.

Also added a proxy mechanism that tries to provide safer networking semantics using ExportedGObjects which can be watched/called from the Pygame loop (with the appropriate callbacks, which are handled in your Pygame loop, so they don't crash your Activity if they use Pygame primitives).

Updated the tutorial to show usage of the Journal API. Still need to add the ExportedGObject usage stuff to the tutorial. I've updated Productive to use the new API. Still a few awkward moments in there, in particular, would like to have a more natural "watch for events" spelling, i.e. ask the proxy object to watch for an event, rather than asking the tube (so that the object can fill in the path and interface information).

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.