Skip to content

Commit d0f1549

Browse files
BigBrainAFKJayFoxRox
authored andcommitted
Supply list of accelerators
1 parent 7e2afe6 commit d0f1549

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

main.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,6 @@ def __init__(self):
170170
self._p = None
171171
self._qmp = None
172172

173-
@staticmethod
174-
def generateAcceleratorArg(use):
175-
if not use:
176-
return ''
177-
178-
# pick accelerator based on OS (default to none if OS is unknown)
179-
return {'Darwin': ',-accel=haxm',
180-
'Linux': ',accel=kvm,kernel_irqchip=off',
181-
'Windows': ',accel=haxm'}.get(platform.system(), '')
182-
183173
@staticmethod
184174
def generateControllerArg(settings):
185175
def genArg(settings, name, port):
@@ -246,8 +236,7 @@ def escape_path(path):
246236
short_anim_arg = ',short_animation' if settings.settings['short_anim'] else ''
247237
hdd_lock_arg = ',locked' if settings.settings['hdd_locked'] else ''
248238
sys_memory = settings.settings['sys_memory'].split(' ')[0]+'M'
249-
accelerator_arg = Xqemu.generateAcceleratorArg(settings.settings['use_accelerator'])
250-
239+
accel_arg = ',accel=kvm:hax:whpx,kernel_irqchip=off' if settings.settings['use_accelerator'] else ''
251240
dvd_path_arg = ''
252241
if settings.settings['dvd_present']:
253242
check_path(settings.settings['dvd_path'])
@@ -258,7 +247,7 @@ def escape_path(path):
258247
# Build qemu launch cmd
259248
cmd = [xqemu_path,
260249
'-cpu','pentium3',
261-
'-machine','xbox%(accelerator_arg)s,bootrom=%(mcpx_path_arg)s%(short_anim_arg)s' % locals(),
250+
'-machine','xbox%(accel_arg)s,bootrom=%(mcpx_path_arg)s%(short_anim_arg)s' % locals(),
262251
'-m', '%(sys_memory)s' % locals(),
263252
'-bios', '%(flash_path_arg)s' % locals(),
264253
'-drive','file=%(hdd_path_arg)s,index=0,media=disk%(hdd_lock_arg)s' % locals(),

0 commit comments

Comments
 (0)