I have configures Zsnes to play some roms and I have found a problem
with the way the stop method works.
The stop method kills the child that Freevo has created to run zsnes.
This way Zsnes seems to not save the state of the game and for example
"Super Mario world" starts always from the beginning.

Using the Xtest extension of Xwindow it is possible to send fake
keypresses to the game and exit the game cleanly.

I have used the library keycontrol that can be found this link
http://www.hackdiary.com/archives/000037.html in the archive
http://www.hackdiary.com/src/blueremote-1.0.tar.gz

The blueremote.py is no useful for Freevo as it does the same as the
bluetooth plugin (by the way, the name conflicts with the bluez
bindings. I think it's better to change it)


I compiled the keycontrol library, copied to kaa/input and override the
method stop in the Emu Class.


    def stop(self):
        """
        Stop the Application.
        """
        if hasattr(CONF, 'display') and CONF.display == 'x11':
                kaa.input.keycontrol.tapkey('ESC')
                log.debug('Faking the press of key ESC')
        else:
                log.debug('Trying to kill the child')
                if self.has_child():
                        self.child_stop()



This is a preliminar code that I have used to test that it works.  I
would like to add another field to the GAMES_ITEMS structure with the key
code that a particular game uses to exit.
If it's None the method should exit with the self.child_stop() method
as before. It should be possible too to add a timer to kill the game if
the keypressing does not work.

Do you think it's a good addition to the games plugin?

-- 

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to