Merge pull request #75198 from Bestest-Coder/master

Added --gpu-index to `forwardable_cli_arguments`
This commit is contained in:
Rémi Verschelde 2023-08-03 14:46:22 +02:00
commit 7ada24c985
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 9 additions and 0 deletions

View File

@ -857,6 +857,15 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
forwardable_cli_arguments[CLI_SCOPE_TOOL].push_back(I->next()->get()); forwardable_cli_arguments[CLI_SCOPE_TOOL].push_back(I->next()->get());
} }
} }
// If gpu is specified, both editor and debug instances started from editor will inherit.
if (I->get() == "--gpu-index") {
if (I->next()) {
forwardable_cli_arguments[CLI_SCOPE_TOOL].push_back(I->get());
forwardable_cli_arguments[CLI_SCOPE_TOOL].push_back(I->next()->get());
forwardable_cli_arguments[CLI_SCOPE_PROJECT].push_back(I->get());
forwardable_cli_arguments[CLI_SCOPE_PROJECT].push_back(I->next()->get());
}
}
#endif #endif
if (adding_user_args) { if (adding_user_args) {