mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 19:08:24 -05:00
cmd: Support passing game arguments from command line
Uses -p (--program) and following string as args.
This commit is contained in:
@ -130,7 +130,7 @@ VAddr AppLoader_NSO::LoadModule(FileSys::VirtualFile file, VAddr load_base,
|
||||
if (should_pass_arguments && !Settings::values.program_args.empty()) {
|
||||
const auto arg_data = Settings::values.program_args;
|
||||
codeset->DataSegment().size += 0x9000;
|
||||
NSOArgumentHeader args_header{0x9000, arg_data.size(), {}};
|
||||
NSOArgumentHeader args_header{0x9000, static_cast<u32_le>(arg_data.size()), {}};
|
||||
program_image.resize(static_cast<u32>(program_image.size()) + 0x9000);
|
||||
std::memcpy(program_image.data() + program_image.size() - 0x9000, &args_header,
|
||||
sizeof(NSOArgumentHeader));
|
||||
|
Reference in New Issue
Block a user