[Emulator] Improvements to launch_data
Added support for autoload titles on boot with: - Specific launch data - Specific xex - Restarting into packages: XamContentLaunchImageFromFileInternal
This commit is contained in:
committed by
Radosław Gliński
parent
7e7784347b
commit
6f287a9597
@@ -27,6 +27,7 @@
|
||||
#include "xenia/config.h"
|
||||
#include "xenia/debug/ui/debug_window.h"
|
||||
#include "xenia/emulator.h"
|
||||
#include "xenia/kernel/xam/xam_module.h"
|
||||
#include "xenia/ui/file_picker.h"
|
||||
#include "xenia/ui/window.h"
|
||||
#include "xenia/ui/window_listener.h"
|
||||
@@ -624,6 +625,20 @@ void EmulatorApp::EmulatorThread() {
|
||||
}
|
||||
}
|
||||
|
||||
auto xam = emulator_->kernel_state()->GetKernelModule<kernel::xam::XamModule>(
|
||||
"xam.xex");
|
||||
|
||||
if (xam) {
|
||||
xam->LoadLoaderData();
|
||||
|
||||
if (xam->loader_data().launch_data_present) {
|
||||
const std::filesystem::path host_path = xam->loader_data().host_path;
|
||||
app_context().CallInUIThread([this, host_path]() {
|
||||
return emulator_window_->RunTitle(host_path);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Now, we're going to use this thread to drive events related to emulation.
|
||||
while (!emulator_thread_quit_requested_.load(std::memory_order_relaxed)) {
|
||||
xe::threading::Wait(emulator_thread_event_.get(), false);
|
||||
|
||||
Reference in New Issue
Block a user