Add primusrun option

This commit is contained in:
Xodetaetl 2014-11-24 12:14:17 +01:00
parent 7f6f15a62b
commit aa5c9a9fd7
2 changed files with 14 additions and 0 deletions

View file

@ -130,6 +130,10 @@ class Game(object):
if system_config.get('reset_pulse'):
audio.reset_pulse()
primusrun = system_config.get('primusrun')
if primusrun and system.find_executable('primusrun'):
launch_arguments.insert(0, 'primusrun')
prefix_command = system_config.get("prefix_command", '').strip()
if prefix_command and system.find_executable(prefix_command):
launch_arguments.insert(0, prefix_command)

View file

@ -49,6 +49,16 @@ system_options = [
'help': ("Some games don't correctly restores gamma on exit, making "
"your display too bright. Select this option to correct it.")
},
{
'option': 'primusrun',
'type': 'bool',
'default': False,
'label': 'Use primusrun (NVIDIA Optimus laptops)',
'help': ("If you have installed the primus package, selecting this "
"option will run the game with the primusrun command, "
"activating your NVIDIA graphic chip for high 3D "
"performance.")
},
{
'option': 'display',
'type': 'choice',