From 52bff36f9593880bdb49c57d20d54e9b219b9565 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Tue, 22 Oct 2024 15:37:02 +0100 Subject: [PATCH] lime_qt: Implemented `--movie-record-author` option --- src/lime_qt/lime_qt.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lime_qt/lime_qt.cpp b/src/lime_qt/lime_qt.cpp index 9082c0de2..e50e17b95 100644 --- a/src/lime_qt/lime_qt.cpp +++ b/src/lime_qt/lime_qt.cpp @@ -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;