mirror of
https://github.com/lutris/lutris
synced 2024-10-14 03:32:52 +00:00
Remove unused joy2key support
This commit is contained in:
parent
8e7802b74b
commit
06565d8428
|
@ -151,7 +151,7 @@ Here's what to expect from the future versions of lutris:
|
||||||
private storage, allowing you to reinstall them on all your devices)
|
private storage, allowing you to reinstall them on all your devices)
|
||||||
* Game saves sync
|
* Game saves sync
|
||||||
* Community features (friends list, chat, multiplayer game scheduling)
|
* Community features (friends list, chat, multiplayer game scheduling)
|
||||||
* Controller configuration GUI (with xboxdrv / joy2key support)
|
* Controller configuration GUI (with xboxdrv support)
|
||||||
|
|
||||||
Come with us!
|
Come with us!
|
||||||
=============
|
=============
|
||||||
|
|
|
@ -326,33 +326,13 @@ class Game(object):
|
||||||
self.game_thread.set_stop_command(self.runner.stop)
|
self.game_thread.set_stop_command(self.runner.stop)
|
||||||
self.game_thread.start()
|
self.game_thread.start()
|
||||||
self.state = self.STATE_RUNNING
|
self.state = self.STATE_RUNNING
|
||||||
if 'joy2key' in gameplay_info:
|
|
||||||
self.joy2key(gameplay_info['joy2key'])
|
# xboxdrv setup
|
||||||
xboxdrv_config = system_config.get('xboxdrv')
|
xboxdrv_config = system_config.get('xboxdrv')
|
||||||
if xboxdrv_config:
|
if xboxdrv_config:
|
||||||
self.xboxdrv_start(xboxdrv_config)
|
self.xboxdrv_start(xboxdrv_config)
|
||||||
self.heartbeat = GLib.timeout_add(HEARTBEAT_DELAY, self.beat)
|
|
||||||
|
|
||||||
def joy2key(self, config):
|
self.heartbeat = GLib.timeout_add(HEARTBEAT_DELAY, self.beat)
|
||||||
"""Run a joy2key thread."""
|
|
||||||
if not system.find_executable('joy2key'):
|
|
||||||
logger.error("joy2key is not installed")
|
|
||||||
return
|
|
||||||
win = "grep %s" % config['window']
|
|
||||||
if 'notwindow' in config:
|
|
||||||
win += ' | grep -v %s' % config['notwindow']
|
|
||||||
wid = "xwininfo -root -tree | %s | awk '{print $1}'" % win
|
|
||||||
buttons = config['buttons']
|
|
||||||
axis = "Left Right Up Down"
|
|
||||||
rcfile = os.path.expanduser("~/.joy2keyrc")
|
|
||||||
rc_option = '-rcfile %s' % rcfile if os.path.exists(rcfile) else ''
|
|
||||||
command = "sleep 5 "
|
|
||||||
command += "&& joy2key $(%s) -X %s -buttons %s -axis %s" % (
|
|
||||||
wid, rc_option, buttons, axis
|
|
||||||
)
|
|
||||||
joy2key_thread = LutrisThread(command)
|
|
||||||
self.game_thread.attach_thread(joy2key_thread)
|
|
||||||
joy2key_thread.start()
|
|
||||||
|
|
||||||
def xboxdrv_start(self, config):
|
def xboxdrv_start(self, config):
|
||||||
command = [
|
command = [
|
||||||
|
|
Loading…
Reference in a new issue