Redesign the ability to load state at boot

BootParameters can now contain the path of a savestate to load at boot.
Movie has been made to use this instead of poking at Core.cpp's state.
This commit is contained in:
JosJuice
2017-12-25 18:07:29 +01:00
parent c9b78e23a2
commit 9dd88d76dd
13 changed files with 93 additions and 81 deletions

View File

@ -8,6 +8,7 @@
#include <atomic>
#include <cstddef>
#include <fstream>
#include <optional>
#include <string>
#include <utility>
#include <vector>
@ -130,8 +131,9 @@ void CRenderFrame::OnDropFiles(wxDropFilesEvent& event)
main_frame->GetMenuBar()->FindItem(IDM_RECORD_READ_ONLY)->Check(true);
}
if (Movie::PlayInput(filepath))
main_frame->BootGame("");
std::optional<std::string> savestate_path;
if (Movie::PlayInput(filepath, &savestate_path))
main_frame->BootGame("", savestate_path);
}
else if (!Core::IsRunning())
{