summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2022-08-25 08:42:34 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2022-08-25 08:42:59 +0200
commit335a4099dedd950c5b6d45f6b1b1a464bf39341e (patch)
tree311bb74b3a44070bcefdf82d544ed721532621fa /main
parent629524c7a20fa599c1a97be21d67239a8dca682b (diff)
Fix forwarding of CLI arguments taking an option
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 8a25827e02..126ac59070 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -725,11 +725,16 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
forwardable_cli_arguments[CLI_SCOPE_TOOL].push_back(I->get());
forwardable_cli_arguments[CLI_SCOPE_PROJECT].push_back(I->get());
}
- if (I->get() == "--single-window" ||
- I->get() == "--audio-driver" ||
+ if (I->get() == "--single-window") {
+ forwardable_cli_arguments[CLI_SCOPE_TOOL].push_back(I->get());
+ }
+ if (I->get() == "--audio-driver" ||
I->get() == "--display-driver" ||
I->get() == "--rendering-driver") {
- forwardable_cli_arguments[CLI_SCOPE_TOOL].push_back(I->get());
+ if (I->next()) {
+ forwardable_cli_arguments[CLI_SCOPE_TOOL].push_back(I->get());
+ forwardable_cli_arguments[CLI_SCOPE_TOOL].push_back(I->next()->get());
+ }
}
#endif