Add title request functions to Emulator

This commit is contained in:
Dr. Chat 2016-06-18 21:17:37 -05:00
parent 6bd19518eb
commit 807c030f86
2 changed files with 16 additions and 0 deletions

View File

@ -415,6 +415,18 @@ bool Emulator::RestoreFromFile(const std::wstring& path) {
return true;
}
bool Emulator::TitleRequested() {
auto xam = kernel_state()->GetKernelModule<kernel::xam::XamModule>("xam.xex");
return xam->loader_data().launch_data_present;
}
void Emulator::LaunchNextTitle() {
auto xam = kernel_state()->GetKernelModule<kernel::xam::XamModule>("xam.xex");
auto next_title = xam->loader_data().launch_path;
CompleteLaunch(L"", next_title);
}
bool Emulator::ExceptionCallbackThunk(Exception* ex, void* data) {
return reinterpret_cast<Emulator*>(data)->ExceptionCallback(ex);
}

View File

@ -125,6 +125,10 @@ class Emulator {
bool SaveToFile(const std::wstring& path);
bool RestoreFromFile(const std::wstring& path);
// The game can request another title to be loaded.
bool TitleRequested();
void LaunchNextTitle();
void WaitUntilExit();
public: