mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 09:18:40 +12:00
Emulator: Implement config CLI args, add barrier for host CLI args
Some checks are pending
Some checks are pending
This commit is contained in:
parent
bd41774960
commit
783079266e
5 changed files with 128 additions and 32 deletions
|
@ -1418,6 +1418,8 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
|
|||
|
||||
if (resolve_path_as_vfs_path)
|
||||
{
|
||||
ensure(!argv.empty());
|
||||
|
||||
if (argv[0].starts_with("/dev_hdd0"sv))
|
||||
{
|
||||
m_path = rpcs3::utils::get_hdd0_dir();
|
||||
|
@ -1464,10 +1466,10 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
|
|||
sys_log.error("Unknown source for path redirection: %s", argv[0]);
|
||||
}
|
||||
|
||||
if (argv.size() == 1)
|
||||
if (argv.size() >= 1)
|
||||
{
|
||||
// Resolve later properly as if booted through host path
|
||||
argv.clear();
|
||||
argv[0].clear();
|
||||
}
|
||||
|
||||
sys_log.notice("Restored executable path: \'%s\'", m_path);
|
||||
|
@ -2285,6 +2287,21 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
|
|||
argv.resize(1);
|
||||
}
|
||||
|
||||
for (const auto& [arg_name, arg] : g_cfg.sys.sup_argv.get_map())
|
||||
{
|
||||
if (m_ar)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// arg_name is unused here
|
||||
// It exists solely for the user's convenience
|
||||
|
||||
sys_log.success("Passing CLI argument %d - \'%s\': \"%s\"", argv.size(), arg_name, arg);
|
||||
|
||||
argv.emplace_back(arg);
|
||||
}
|
||||
|
||||
if (argv[0].empty())
|
||||
{
|
||||
auto unescape = [](std::string_view path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue