summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp39
-rw-r--r--main/performance.cpp4
-rw-r--r--main/performance.h4
3 files changed, 9 insertions, 38 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 609c865a1c..2134e5079d 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1350,35 +1350,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// always convert to lower case for consistency in the code
rendering_driver = rendering_driver.to_lower();
- GLOBAL_DEF_BASIC("display/window/size/viewport_width", 1024);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/viewport_width",
- PropertyInfo(Variant::INT, "display/window/size/viewport_width",
- PROPERTY_HINT_RANGE,
- "0,7680,1,or_greater")); // 8K resolution
-
- GLOBAL_DEF_BASIC("display/window/size/viewport_height", 600);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/viewport_height",
- PropertyInfo(Variant::INT, "display/window/size/viewport_height",
- PROPERTY_HINT_RANGE,
- "0,4320,1,or_greater")); // 8K resolution
-
- GLOBAL_DEF_BASIC("display/window/size/resizable", true);
- GLOBAL_DEF_BASIC("display/window/size/borderless", false);
- GLOBAL_DEF_BASIC("display/window/size/fullscreen", false);
- GLOBAL_DEF("display/window/size/always_on_top", false);
- GLOBAL_DEF("display/window/size/window_width_override", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/window_width_override",
- PropertyInfo(Variant::INT,
- "display/window/size/window_width_override",
- PROPERTY_HINT_RANGE,
- "0,7680,1,or_greater")); // 8K resolution
- GLOBAL_DEF("display/window/size/window_height_override", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/window_height_override",
- PropertyInfo(Variant::INT,
- "display/window/size/window_height_override",
- PROPERTY_HINT_RANGE,
- "0,4320,1,or_greater")); // 8K resolution
-
if (use_custom_res) {
if (!force_res) {
window_size.width = GLOBAL_GET("display/window/size/viewport_width");
@@ -2351,11 +2322,11 @@ bool Main::start() {
if (!project_manager && !editor) { // game
if (!game_path.is_empty() || !script.is_empty()) {
//autoload
- OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ HashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
//first pass, add the constants so they exist before any script is loaded
- for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
- const ProjectSettings::AutoloadInfo &info = E.get();
+ for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) {
+ const ProjectSettings::AutoloadInfo &info = E.value;
if (info.is_singleton) {
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
@@ -2366,8 +2337,8 @@ bool Main::start() {
//second pass, load into global constants
List<Node *> to_add;
- for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
- const ProjectSettings::AutoloadInfo &info = E.get();
+ for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) {
+ const ProjectSettings::AutoloadInfo &info = E.value;
Ref<Resource> res = ResourceLoader::load(info.path);
ERR_CONTINUE_MSG(res.is_null(), "Can't autoload: " + info.path);
diff --git a/main/performance.cpp b/main/performance.cpp
index e80906b4a7..25659b999f 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -247,8 +247,8 @@ Array Performance::get_custom_monitor_names() {
Array return_array;
return_array.resize(_monitor_map.size());
int index = 0;
- for (OrderedHashMap<StringName, MonitorCall>::Element i = _monitor_map.front(); i; i = i.next()) {
- return_array.set(index, i.key());
+ for (KeyValue<StringName, MonitorCall> i : _monitor_map) {
+ return_array.set(index, i.key);
index++;
}
return return_array;
diff --git a/main/performance.h b/main/performance.h
index 927b5b0389..2837d8f512 100644
--- a/main/performance.h
+++ b/main/performance.h
@@ -32,7 +32,7 @@
#define PERFORMANCE_H
#include "core/object/class_db.h"
-#include "core/templates/ordered_hash_map.h"
+#include "core/templates/hash_map.h"
#define PERF_WARN_OFFLINE_FUNCTION
#define PERF_WARN_PROCESS_SYNC
@@ -58,7 +58,7 @@ class Performance : public Object {
Variant call(bool &r_error, String &r_error_message);
};
- OrderedHashMap<StringName, MonitorCall> _monitor_map;
+ HashMap<StringName, MonitorCall> _monitor_map;
uint64_t _monitor_modification_time;
public: