Author: duncan
Date: Mon Oct 2 09:47:09 2006
New Revision: 8298
Modified:
branches/rel-1-5/freevo/src/plugins/joy.py
Log:
[ 1566590 ] Patch to stop joystick when running a game
Patch applied.
Modified: branches/rel-1-5/freevo/src/plugins/joy.py
==============================================================================
--- branches/rel-1-5/freevo/src/plugins/joy.py (original)
+++ branches/rel-1-5/freevo/src/plugins/joy.py Mon Oct 2 09:47:09 2006
@@ -56,6 +56,7 @@
def __init__(self):
self.device_name = ''
+ self.enabled = True
if config.JOY_DEV == 0:
self.reason = 'Joystick input module disabled'
@@ -90,6 +91,9 @@
def poll(self):
+ if not self.enabled:
+ return
+
command = ''
_debug_('self.joyfd = %s' % self.joyfd, level=3)
(r, w, e) = select.select([self.joyfd], [], [], 0)
@@ -124,4 +128,8 @@
if command:
rc.post_event(command)
+ def enable(self, enable_joy=True):
+ self.enabled = enable_joy
+ return
+
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog