mirror of
https://github.com/gryf/fs-uae-wrapper.git
synced 2026-02-13 12:45:46 +01:00
Added wrapper_save_state option
This commit is contained in:
@@ -65,9 +65,6 @@ class Archive(base.Base):
|
||||
|
||||
validation_result = super(Archive, self)._validate_options()
|
||||
|
||||
if not super(Archive, self)._validate_options():
|
||||
validation_result = False
|
||||
|
||||
if 'wrapper_archive' not in self.all_options:
|
||||
sys.stderr.write("Configuration lacks of required "
|
||||
"`wrapper_archive' option.\n")
|
||||
|
||||
@@ -147,6 +147,9 @@ class Base(object):
|
||||
"""
|
||||
Get the saves from emulator and store it where configuration is placed
|
||||
"""
|
||||
if self.all_options.get('wrapper_save_state', '0') != '1':
|
||||
return True
|
||||
|
||||
os.chdir(self.dir)
|
||||
save_path = self._get_saves_dir()
|
||||
if not save_path:
|
||||
@@ -169,6 +172,9 @@ class Base(object):
|
||||
"""
|
||||
Put the saves (if exists) to the temp directory.
|
||||
"""
|
||||
if self.all_options.get('wrapper_save_state', '0') != '1':
|
||||
return True
|
||||
|
||||
if not os.path.exists(self.save_filename):
|
||||
return True
|
||||
|
||||
@@ -212,6 +218,9 @@ class Base(object):
|
||||
"`wrapper' option.\n")
|
||||
return False
|
||||
|
||||
if self.all_options.get('wrapper_save_state', '0') == '0':
|
||||
return True
|
||||
|
||||
if 'wrapper_archiver' not in self.all_options:
|
||||
sys.stderr.write("Configuration lacks of required "
|
||||
"`wrapper_archiver' option.\n")
|
||||
|
||||
@@ -45,7 +45,10 @@ class CD32(base.Base):
|
||||
if kick_opts:
|
||||
self.fsuae_options.update(kick_opts)
|
||||
|
||||
if self._run_emulator(self.fsuae_options.list()):
|
||||
if not self._run_emulator(self.fsuae_options.list()):
|
||||
return False
|
||||
|
||||
if self._get_saves_dir():
|
||||
return self._save_save()
|
||||
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user