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:
capitalistspz 2023-07-07 23:48:41 +00:00 committed by GitHub
parent ea86c77088
commit f1c200a016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 195 additions and 8 deletions

View file

@ -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"))
{