summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp11
-rw-r--r--main/performance.cpp7
-rw-r--r--main/performance.h5
3 files changed, 16 insertions, 7 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
diff --git a/main/performance.cpp b/main/performance.cpp
index 0de525134e..bdcd07a216 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -32,6 +32,7 @@
#include "core/object/message_queue.h"
#include "core/os/os.h"
+#include "core/variant/typed_array.h"
#include "scene/main/node.h"
#include "scene/main/scene_tree.h"
#include "servers/audio_server.h"
@@ -240,11 +241,11 @@ Variant Performance::get_custom_monitor(const StringName &p_id) {
return return_value;
}
-Array Performance::get_custom_monitor_names() {
+TypedArray<StringName> Performance::get_custom_monitor_names() {
if (!_monitor_map.size()) {
- return Array();
+ return TypedArray<StringName>();
}
- Array return_array;
+ TypedArray<StringName> return_array;
return_array.resize(_monitor_map.size());
int index = 0;
for (KeyValue<StringName, MonitorCall> i : _monitor_map) {
diff --git a/main/performance.h b/main/performance.h
index 00e00886ef..597666b57d 100644
--- a/main/performance.h
+++ b/main/performance.h
@@ -37,6 +37,9 @@
#define PERF_WARN_OFFLINE_FUNCTION
#define PERF_WARN_PROCESS_SYNC
+template <typename T>
+class TypedArray;
+
class Performance : public Object {
GDCLASS(Performance, Object);
@@ -107,7 +110,7 @@ public:
void remove_custom_monitor(const StringName &p_id);
bool has_custom_monitor(const StringName &p_id);
Variant get_custom_monitor(const StringName &p_id);
- Array get_custom_monitor_names();
+ TypedArray<StringName> get_custom_monitor_names();
uint64_t get_monitor_modification_time();