mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -5,6 +5,7 @@
|
||||
#include <OptionParser.h>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <wx/app.h>
|
||||
@ -256,12 +257,18 @@ void DolphinApp::AfterInit()
|
||||
|
||||
if (m_play_movie && !m_movie_file.empty())
|
||||
{
|
||||
if (Movie::PlayInput(WxStrToStr(m_movie_file)))
|
||||
std::optional<std::string> savestate_path;
|
||||
if (Movie::PlayInput(WxStrToStr(m_movie_file), &savestate_path))
|
||||
{
|
||||
if (m_boot)
|
||||
{
|
||||
m_boot->savestate_path = savestate_path;
|
||||
main_frame->StartGame(std::move(m_boot));
|
||||
}
|
||||
else
|
||||
main_frame->BootGame("");
|
||||
{
|
||||
main_frame->BootGame("", savestate_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
// First check if we have an exec command line.
|
||||
|
Reference in New Issue
Block a user