mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-21 11:46:59 +02:00
[hle] make HBLoader work, add -hlaunch option (#3981)
hbloader is required to launch a bunch of shit (particularly hbmenu) however due to some restrictive metadata validation, it doesn't get recognized as an NSP file programs like hbmenu require hbloader (since it feeds them data like ConfigEntries and whatnot), launching hbmenu as-is standalone will result in a launchInit() error adds an option to launch hbmenu via command line Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3981 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
e875a3196b
commit
300a646a34
4 changed files with 26 additions and 5 deletions
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -268,7 +271,8 @@ Result KCapabilities::SetHandleTableCapability(const u32 cap) {
|
|||
Result KCapabilities::SetDebugFlagsCapability(const u32 cap) {
|
||||
// Validate.
|
||||
const DebugFlags pack{cap};
|
||||
R_UNLESS(pack.reserved == 0, ResultReservedUsed);
|
||||
// TODO: Enabling this breaks compatibility with HBloader and such
|
||||
//R_UNLESS(pack.reserved == 0, ResultReservedUsed);
|
||||
|
||||
DebugFlags debug_capabilities{m_debug_capabilities};
|
||||
debug_capabilities.allow_debug.Assign(pack.allow_debug);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
// Qt on macOS doesn't define VMA shit
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include "common/fs/path_util.h"
|
||||
#include "common/settings.h"
|
||||
#include "common/settings_enums.h"
|
||||
#include "frontend_common/settings_generator.h"
|
||||
|
|
@ -635,6 +636,7 @@ MainWindow::MainWindow(bool has_broken_vulkan)
|
|||
|
||||
QString game_path;
|
||||
bool should_launch_qlaunch = false;
|
||||
bool should_launch_hlaunch = false;
|
||||
bool should_launch_setup = false;
|
||||
bool has_gamepath = false;
|
||||
bool is_fullscreen = false;
|
||||
|
|
@ -676,6 +678,8 @@ MainWindow::MainWindow(bool has_broken_vulkan)
|
|||
players[0].profile_name = args[++i].toStdString();
|
||||
} else if (args[i] == QStringLiteral("-qlaunch")) {
|
||||
should_launch_qlaunch = true;
|
||||
} else if (args[i] == QStringLiteral("-hlaunch")) {
|
||||
should_launch_hlaunch = true;
|
||||
} else if (args[i] == QStringLiteral("-setup")) {
|
||||
should_launch_setup = true;
|
||||
} else {
|
||||
|
|
@ -694,10 +698,12 @@ MainWindow::MainWindow(bool has_broken_vulkan)
|
|||
} else {
|
||||
if (!game_path.isEmpty()) {
|
||||
BootGame(game_path, ApplicationAppletParameters());
|
||||
} else {
|
||||
if (should_launch_qlaunch) {
|
||||
LaunchFirmwareApplet(u64(Service::AM::AppletProgramId::QLaunch), std::nullopt);
|
||||
}
|
||||
} else if (should_launch_qlaunch) {
|
||||
LaunchFirmwareApplet(u64(Service::AM::AppletProgramId::QLaunch), std::nullopt);
|
||||
} else if (should_launch_hlaunch) {
|
||||
std::filesystem::path const sd_dir = Common::FS::GetEdenPathString(Common::FS::EdenPath::SDMCDir);
|
||||
auto const hbl_path = (sd_dir / "atmosphere" / "hbl.nsp").string();
|
||||
BootGame(QString::fromStdString(hbl_path), ApplicationAppletParameters());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue