lime_qt: Implemented --movie-record-author option

This commit is contained in:
OpenSauce04 2024-10-22 15:37:02 +01:00
parent 2d525ec40a
commit 52bff36f95

View File

@ -229,6 +229,8 @@ GMainWindow::GMainWindow(Core::System& system_)
"-i, --install [path] Install a CIA file at the given path\n"
"-p, --movie-play [path] Play a TAS movie located at the given path\n"
"-r, --movie-record [path] Record a TAS movie to the given file path\n"
"-a, --movie-record-author [author] Set the author for the recorded TAS "
"movie (to be used alongside --movie-record)\n"
"-v, --version Output version information and exit"
"-w, --windowed Start in windowed mode";
@ -297,6 +299,14 @@ GMainWindow::GMainWindow(Core::System& system_)
continue;
}
if (args[i] == QStringLiteral("--movie-record-author") || args[i] == QStringLiteral("-a")) {
if (i >= args.size() - 1 || args[i + 1].startsWith(QChar::fromLatin1('-'))) {
continue;
}
movie_record_author = args[++i];
continue;
}
if (args[i] == QStringLiteral("--version") || args[i] == QStringLiteral("-v")) {
const std::string version_string =
std::string("Lime3DS ") + Common::g_scm_branch + " " + Common::g_scm_desc;