mirror of https://github.com/stella-emu/stella.git
make automatic TM saving load the states on enter too
This commit is contained in:
parent
ffeaa61cbe
commit
ff388cfb31
|
@ -97,7 +97,8 @@
|
|||
|
||||
* Added option to save and load all TimeMachine states at once.
|
||||
|
||||
* Added option to automatically save states when exiting emulation.
|
||||
* Added option to automatically load/save states when entering/exiting
|
||||
emulation.
|
||||
|
||||
* Added option to change pitch of Pitfall II music.
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.7 KiB |
|
@ -2256,7 +2256,8 @@
|
|||
|
||||
<tr>
|
||||
<td><pre>-saveonexit <none|current|all></pre></td>
|
||||
<td>Automatically save no, current or all states when exiting emulation.</td>
|
||||
<td>Automatically save no, current or all states when exiting emulation. The latter
|
||||
also loads all states when entering emulation.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
@ -3402,11 +3403,12 @@
|
|||
</td>
|
||||
<td>-plr.tm.horizon<br>-dev.tm.horizon</td>
|
||||
</tr><tr>
|
||||
<td>When exiting emulation:</td>
|
||||
<td>When entering/exiting emulation:</td>
|
||||
<td>
|
||||
Automatically save no, current or all Time Machine states when exiting emulation.<br/>
|
||||
When saving is enabled, you can always continue your game session
|
||||
from where you exited it. Even including the Time Machine buffer!
|
||||
The latter also loads all states when entering emulation. When this is enabled, you
|
||||
can always continue your game session from where you exited it. Even including the
|
||||
Time Machine buffer!
|
||||
</td>
|
||||
<td>-saveonexit</td>
|
||||
</tr><tr>
|
||||
|
|
|
@ -745,11 +745,17 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
|||
if (myOSystem.settings().getBool("confirmexit"))
|
||||
{
|
||||
StringList msg;
|
||||
string saveOnExit = myOSystem.settings().getString("saveonexit");
|
||||
bool activeTM = myOSystem.settings().getBool(
|
||||
myOSystem.settings().getBool("dev.settings") ? "dev.timemachine" : "plr.timemachine");
|
||||
|
||||
|
||||
msg.push_back("Do you really want to exit emulation?");
|
||||
if (saveOnExit != "all" || !activeTM)
|
||||
{
|
||||
msg.push_back("");
|
||||
msg.push_back("You will lose all your progress.");
|
||||
|
||||
}
|
||||
myOSystem.messageMenu().setMessage("Exit Emulation", msg, true);
|
||||
enterMenuMode(EventHandlerState::MESSAGEMENU);
|
||||
}
|
||||
|
@ -1775,8 +1781,11 @@ void EventHandler::setState(EventHandlerState state)
|
|||
void EventHandler::exitEmulation(bool checkLauncher)
|
||||
{
|
||||
string saveOnExit = myOSystem.settings().getString("saveonexit");
|
||||
bool activeTM = myOSystem.settings().getBool(
|
||||
myOSystem.settings().getBool("dev.settings") ? "dev.timemachine" : "plr.timemachine");
|
||||
|
||||
if (saveOnExit == "all")
|
||||
|
||||
if (saveOnExit == "all" && activeTM)
|
||||
handleEvent(Event::SaveAllStates);
|
||||
else if (saveOnExit == "current")
|
||||
handleEvent(Event::SaveState);
|
||||
|
|
|
@ -410,6 +410,13 @@ string OSystem::createConsole(const FilesystemNode& rom, const string& md5sum,
|
|||
}
|
||||
myConsole->initializeAudio();
|
||||
|
||||
string saveOnExit = settings().getString("saveonexit");
|
||||
bool activeTM = settings().getBool(
|
||||
settings().getBool("dev.settings") ? "dev.timemachine" : "plr.timemachine");
|
||||
|
||||
if (saveOnExit == "all" && activeTM)
|
||||
myEventHandler->handleEvent(Event::LoadAllStates);
|
||||
|
||||
if(showmessage)
|
||||
{
|
||||
const string& id = myConsole->cartridge().multiCartID();
|
||||
|
|
|
@ -478,11 +478,11 @@ void DeveloperDialog::addTimeMachineTab(const GUI::Font& font)
|
|||
|
||||
ypos += lineHeight + VGAP * 2;
|
||||
new StaticTextWidget(myTab, font, HBORDER, ypos + 1,
|
||||
"When exiting emulation:");
|
||||
"When entering/exiting emulation:");
|
||||
ypos += lineHeight + VGAP;
|
||||
mySaveOnExitGroup = new RadioButtonGroup();
|
||||
r = new RadioButtonWidget(myTab, font, HBORDER + INDENT, ypos + 1,
|
||||
"Save nothing", mySaveOnExitGroup);
|
||||
"Do nothing", mySaveOnExitGroup);
|
||||
wid.push_back(r);
|
||||
ypos += lineHeight + VGAP;
|
||||
r = new RadioButtonWidget(myTab, font, HBORDER + INDENT, ypos + 1,
|
||||
|
@ -490,7 +490,7 @@ void DeveloperDialog::addTimeMachineTab(const GUI::Font& font)
|
|||
wid.push_back(r);
|
||||
ypos += lineHeight + VGAP;
|
||||
r = new RadioButtonWidget(myTab, font, HBORDER + INDENT, ypos + 1,
|
||||
"Save all Time Machine states", mySaveOnExitGroup);
|
||||
"Load/save all Time Machine states", mySaveOnExitGroup);
|
||||
wid.push_back(r);
|
||||
ypos += lineHeight + VGAP;
|
||||
|
||||
|
|
Loading…
Reference in New Issue