Skip to content

Commit

Permalink
Fix user provided whdload options
Browse files Browse the repository at this point in the history
  • Loading branch information
gryf committed Sep 14, 2024
1 parent 7e3d686 commit 4c61c3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fs_uae_wrapper/whdload.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ def _find_slave(self):
# find proper way to handle slave
# 1. check if there are user provided params
contents = f"cd {slave_path}\n"
if self.fsuae_options.get('wrapper_whdload_options'):
if self.all_options.get('wrapper_whdload_options'):
contents = (f"{contents}"
f"C:whdload "
f"{self.fsuae_options['wrapper_whdload_options']} "
f"{self.all_options['wrapper_whdload_options']} "
f"Slave={slave_fname}\n")
else:
# no params, find if kgiconload is available
Expand Down
2 changes: 1 addition & 1 deletion tests/test_whdload.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def test_find_custom_options(self, chdir, walk, listdir):
listdir.return_value = contents
wrapper = whdload.Wrapper('Config.fs-uae', utils.CmdOption(), {})
whdl_opts = 'Preload SplashDelay=0 MMU PAL'
wrapper.fsuae_options['wrapper_whdload_options'] = whdl_opts
wrapper.all_options['wrapper_whdload_options'] = whdl_opts
with mock.patch('builtins.open', _open):
self.assertTrue(wrapper._find_slave())
handle = _open()
Expand Down

0 comments on commit 4c61c3d

Please sign in to comment.