provide proper load params

This commit is contained in:
lizzie 2026-05-20 05:20:59 +00:00
parent 41283a8fac
commit daee174a87
3 changed files with 50 additions and 13 deletions

View file

@ -515,6 +515,7 @@ MainWindow::MainWindow(bool has_broken_vulkan)
QString game_path;
bool should_launch_qlaunch = false;
bool should_launch_hlaunch = false;
bool should_launch_hlaunch_uloader = false;
bool should_launch_ulaunch = false;
bool should_launch_setup = false;
bool has_gamepath = false;
@ -559,6 +560,8 @@ MainWindow::MainWindow(bool has_broken_vulkan)
should_launch_qlaunch = true;
} else if (args[i] == QStringLiteral("-hlaunch")) {
should_launch_hlaunch = true;
} else if (args[i] == QStringLiteral("-hlaunch-uloader")) {
should_launch_hlaunch_uloader = true;
} else if (args[i] == QStringLiteral("-ulaunch")) {
should_launch_ulaunch = true;
} else if (args[i] == QStringLiteral("-setup")) {
@ -585,12 +588,19 @@ MainWindow::MainWindow(bool has_broken_vulkan)
std::filesystem::path const sd_dir = Common::FS::GetEdenPathString(Common::FS::EdenPath::SDMCDir);
auto const path = (sd_dir / "atmosphere" / "hbl.nsp").string();
BootGame(QString::fromStdString(path), ApplicationAppletParameters());
} else if (should_launch_ulaunch) {
} else if (should_launch_hlaunch_uloader) {
std::filesystem::path const sd_dir = Common::FS::GetEdenPathString(Common::FS::EdenPath::SDMCDir);
auto const path = (sd_dir / "ulaunch" / "bin" / "uLoader" / "application" / "main").string();
auto params = ApplicationAppletParameters();
params.launch_type = Service::AM::LaunchType::FrontendUlaunchInitiated;
BootGame(QString::fromStdString(path), params);
} else if (should_launch_ulaunch) {
std::filesystem::path const sd_dir = Common::FS::GetEdenPathString(Common::FS::EdenPath::SDMCDir);
auto const path = (sd_dir / "ulaunch" / "bin" / "uMenu" / "main").string();
auto const program_id = 0x0100000000010000;
auto params = LibraryAppletParameters(u64(program_id), Service::AM::AppletId::Cabinet);
params.launch_type = Service::AM::LaunchType::FrontendUmenuInitiated;
BootGame(QString::fromStdString(path), params);
}
}
}