mirror of
https://github.com/azahar-emu/azahar.git
synced 2025-03-04 09:45:23 +01:00
citra_qt: Added -r
and -p
options for recording and playing TAS movies respectively
This commit is contained in:
parent
5a462b84b3
commit
485f627edb
@ -306,6 +306,25 @@ GMainWindow::GMainWindow(Core::System& system_)
|
||||
continue;
|
||||
}
|
||||
game_path = args[++i];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (args[i] == QStringLiteral("-p")) {
|
||||
if (i >= args.size() - 1 || args[i + 1].startsWith(QChar::fromLatin1('-'))) {
|
||||
continue;
|
||||
}
|
||||
movie_playback_path = args[++i];
|
||||
movie_playback_on_start = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (args[i] == QStringLiteral("-r")) {
|
||||
if (i >= args.size() - 1 || args[i + 1].startsWith(QChar::fromLatin1('-'))) {
|
||||
continue;
|
||||
}
|
||||
movie_record_path = args[++i];
|
||||
movie_record_on_start = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Launch game in windowed mode
|
||||
@ -3573,9 +3592,11 @@ static void PrintHelp(const char* argv0) {
|
||||
std::cout << "Usage: " << argv0
|
||||
<< " [options] <filename>\n"
|
||||
"-f Start in fullscreen mode\n"
|
||||
"-g [path] Start game at path\n"
|
||||
"-g [path] Start a game file located at the given path\n"
|
||||
"-h Display this help and exit\n"
|
||||
"-i [path] Installs the CIA file at the given path\n"
|
||||
"-i [path] Install a CIA file at the given path\n"
|
||||
"-p [path] Play a TAS movie located at the given path\n"
|
||||
"-r [path] Record a TAS movie to the given file path\n"
|
||||
"-v Output version information and exit\n";
|
||||
}
|
||||
|
||||
@ -3585,7 +3606,7 @@ static void PrintVersion() {
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
while (optind < argc) {
|
||||
int arg = getopt(argc, argv, "fg:hi:v");
|
||||
int arg = getopt(argc, argv, "fg:hi:r:v");
|
||||
if (arg != -1) {
|
||||
switch (static_cast<char>(arg)) {
|
||||
case 'h':
|
||||
|
Loading…
x
Reference in New Issue
Block a user