From: Evan H. <eh...@gm...> - 2007-12-20 08:27:35
|
Duncan- I had an idea about how to handle the generic game option. My python is not good enough to yet to handle the changes but I will outline the idea for you. With line 73 uncommented the following works GAMES_ITEMS = [ ('NINTENDO', '/mnt/anime/NES', ('GENERIC','/usr/bin/tuxnes','-1/dev/input/j0 -2/dev/input/j1 -u -rsdl','',[ 'NES','nes'])) ] But the following does not. GAMES_ITEMS = [ ('Kasteroids', '/etc/freevo/games/', ('GENERIC', '/usr/bin/kasteroids', '', '', ['kas'])) ] The problem is that the current generic.py passes the game selection to the play command and to do this requires a game file. I think a better solution would look to work like this: GAMES_ITEMS = [ ('Kasteroids', '',('GENERIC', '/usr/bin/kasteroids', '', '', None)) ] This way when genericitem.py is called it checks the the Suffix to see if it is needed or not. If the suffix is None then run the cmd+args instead of getting a file list. If I understand the _init_.py call to genericitem.py correct, it's default action is to call util.py and run a search to create a menu list of "games" to run. If instead it checked for a suffix it will know if it should just run the cmd+args or do a listing. I have started looking at the code and it seems like it needs to be added to the games/_init_.py but I am not sure it may need to be added to game.py or genericitem.py Evan P.S> I am going to have make better dev setup for this one :( |