From 36932c04a24ee35757ce87285efe68899d12fb61 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Tue, 22 Oct 2024 21:09:41 +0100 Subject: [PATCH] lime: Added `--no-gui` long option equivalent to `-n` --- src/lime/common_strings.h | 2 +- src/lime/main.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lime/common_strings.h b/src/lime/common_strings.h index 0aa343ac6..2f3c65693 100644 --- a/src/lime/common_strings.h +++ b/src/lime/common_strings.h @@ -12,7 +12,7 @@ constexpr char help_string[] = "-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" - "-n Load the lightweight SDL frontend instead of the usual Qt frontend\n" + "-n, --no-gui Use the lightweight SDL frontend instead of the usual Qt frontend\n" "-m, --multiplayer [nick:password@address:port] Nickname, password, address and port for multiplayer\n" "-v, --version Output version information and exit\n" "-w, --windowed Start in windowed mode"; diff --git a/src/lime/main.cpp b/src/lime/main.cpp index 43b4c763d..7c762f738 100644 --- a/src/lime/main.cpp +++ b/src/lime/main.cpp @@ -11,10 +11,7 @@ int main(int argc, char* argv[]) { #if ENABLE_QT bool no_gui = false; for (int i = 1; i < argc; i++) { - if (argv[i][0] != '-') - continue; - - if (argv[i][1] == 'n') { + if (strcmp(argv[i], "--no-gui") == 0 || strcmp(argv[i], "-n") == 0) { no_gui = true; } }