Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign the ability to load state at boot #6271

Merged
merged 1 commit into from
Dec 26, 2017

Conversation

JosJuice
Copy link
Member

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.

I made this change so that PR #6270 could use it, but I think this change is useful enough on its own, so I'm submitting it as a separate PR.

});
}
if (savestate_path)
QueueHostJob([savestate_path] { ::State::LoadAs(*savestate_path); });

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@@ -535,15 +516,20 @@ static void EmuThread(std::unique_ptr<BootParameters> boot)
Keyboard::LoadConfig();
}

const std::optional<std::string> savestate_path = boot->savestate_path;

This comment was marked as off-topic.

This comment was marked as off-topic.

@@ -474,7 +482,12 @@ void MainWindow::ScreenShot()

void MainWindow::StartGame(const QString& path)

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@JMC47
Copy link
Contributor

JMC47 commented Dec 25, 2017

Can an option to do this for netplay be added? Assuming it's deterministic (it wasn't before.)

I know it may not be 100% related, but, considering this is a very requested feature, it seems like this may be the best time to ask.

@JosJuice
Copy link
Member Author

@JMC47 It would be possible to add it, but I haven't tested if it's deterministic, and there's enough UI design involved that it should be in a separate PR.

@JosJuice JosJuice force-pushed the load-state-at-boot branch 2 times, most recently from 21c720e to cdbac1a Compare December 25, 2017 19:43
@@ -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 = {};

This comment was marked as off-topic.

@@ -513,8 +514,9 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED(event))
GetMenuBar()->FindItem(IDM_RECORD_READ_ONLY)->Check();
}

if (Movie::PlayInput(WxStrToStr(path)))
BootGame("");
std::optional<std::string> savestate_path = {};

This comment was marked as off-topic.

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.
@leoetlino leoetlino merged commit 3bc61ed into dolphin-emu:master Dec 26, 2017
@JosJuice JosJuice deleted the load-state-at-boot branch December 26, 2017 19:58
});
}
if (savestate_path)
QueueHostJob([&savestate_path] { ::State::LoadAs(*savestate_path); });

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants