mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-03 13:31:18 +12:00
Add '--title-id' parameter and desktop shortcut creation (#889)
* Add '--title-id' launch option to launch titles by title id * Add title id column to game list * Add option to create game shortcuts Co-authored-by: Exzap <13877693+Exzap@users.noreply.github.com>
This commit is contained in:
parent
ea86c77088
commit
f1c200a016
7 changed files with 195 additions and 8 deletions
|
@ -60,6 +60,7 @@ bool LaunchSettings::HandleCommandline(const std::vector<std::wstring>& args)
|
|||
("version,v", "Displays the version of Cemu")
|
||||
|
||||
("game,g", po::wvalue<std::wstring>(), "Path of game to launch")
|
||||
("title-id,t", po::value<std::string>(), "Title ID of the title to be launched (overridden by --game)")
|
||||
("mlc,m", po::wvalue<std::wstring>(), "Custom mlc folder location")
|
||||
|
||||
("fullscreen,f", po::value<bool>()->implicit_value(true), "Launch games in fullscreen mode")
|
||||
|
@ -133,6 +134,21 @@ bool LaunchSettings::HandleCommandline(const std::vector<std::wstring>& args)
|
|||
|
||||
s_load_game_file = tmp;
|
||||
}
|
||||
if (vm.count("title-id"))
|
||||
{
|
||||
auto title_param = vm["title-id"].as<std::string>();
|
||||
try {
|
||||
|
||||
if (title_param.starts_with('=')){
|
||||
title_param.erase(title_param.begin());
|
||||
}
|
||||
s_load_title_id = std::stoull(title_param, nullptr, 16);
|
||||
}
|
||||
catch (std::invalid_argument const& e)
|
||||
{
|
||||
std::cerr << "Expected title_param ID as an unsigned 64-bit hexadecimal string\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (vm.count("mlc"))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue