summaryrefslogtreecommitdiffstats
path: root/core/config/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/config/engine.cpp')
-rw-r--r--core/config/engine.cpp47
1 files changed, 38 insertions, 9 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index 0e27d556ec..f2f8aebe8b 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -82,6 +82,17 @@ int Engine::get_audio_output_latency() const {
return _audio_output_latency;
}
+void Engine::increment_frames_drawn() {
+ if (frame_server_synced) {
+ server_syncs++;
+ } else {
+ server_syncs = 0;
+ }
+ frame_server_synced = false;
+
+ frames_drawn++;
+}
+
uint64_t Engine::get_frames_drawn() {
return frames_drawn;
}
@@ -110,11 +121,12 @@ Dictionary Engine::get_version_info() const {
dict["hex"] = VERSION_HEX;
dict["status"] = VERSION_STATUS;
dict["build"] = VERSION_BUILD;
- dict["year"] = VERSION_YEAR;
String hash = String(VERSION_HASH);
dict["hash"] = hash.is_empty() ? String("unknown") : hash;
+ dict["timestamp"] = VERSION_TIMESTAMP;
+
String stringver = String(dict["major"]) + "." + String(dict["minor"]);
if ((int)dict["patch"] != 0) {
stringver += "." + String(dict["patch"]);
@@ -176,14 +188,14 @@ TypedArray<Dictionary> Engine::get_copyright_info() const {
Dictionary Engine::get_donor_info() const {
Dictionary donors;
- donors["platinum_sponsors"] = array_from_info(DONORS_SPONSOR_PLATINUM);
- donors["gold_sponsors"] = array_from_info(DONORS_SPONSOR_GOLD);
- donors["silver_sponsors"] = array_from_info(DONORS_SPONSOR_SILVER);
- donors["bronze_sponsors"] = array_from_info(DONORS_SPONSOR_BRONZE);
- donors["mini_sponsors"] = array_from_info(DONORS_SPONSOR_MINI);
- donors["gold_donors"] = array_from_info(DONORS_GOLD);
- donors["silver_donors"] = array_from_info(DONORS_SILVER);
- donors["bronze_donors"] = array_from_info(DONORS_BRONZE);
+ donors["patrons"] = array_from_info(DONORS_PATRONS);
+ donors["platinum_sponsors"] = array_from_info(DONORS_SPONSORS_PLATINUM);
+ donors["gold_sponsors"] = array_from_info(DONORS_SPONSORS_GOLD);
+ donors["silver_sponsors"] = array_from_info(DONORS_SPONSORS_SILVER);
+ donors["diamond_members"] = array_from_info(DONORS_MEMBERS_DIAMOND);
+ donors["titanium_members"] = array_from_info(DONORS_MEMBERS_TITANIUM);
+ donors["platinum_members"] = array_from_info(DONORS_MEMBERS_PLATINUM);
+ donors["gold_members"] = array_from_info(DONORS_MEMBERS_GOLD);
return donors;
}
@@ -259,6 +271,18 @@ bool Engine::is_printing_error_messages() const {
return CoreGlobals::print_error_enabled;
}
+void Engine::print_header(const String &p_string) const {
+ if (_print_header) {
+ print_line(p_string);
+ }
+}
+
+void Engine::print_header_rich(const String &p_string) const {
+ if (_print_header) {
+ print_line_rich(p_string);
+ }
+}
+
void Engine::add_singleton(const Singleton &p_singleton) {
ERR_FAIL_COND_MSG(singleton_ptrs.has(p_singleton.name), vformat("Can't register singleton '%s' because it already exists.", p_singleton.name));
singletons.push_back(p_singleton);
@@ -351,6 +375,11 @@ Engine *Engine::get_singleton() {
return singleton;
}
+bool Engine::notify_frame_server_synced() {
+ frame_server_synced = true;
+ return server_syncs > SERVER_SYNC_FRAME_COUNT_WARNING;
+}
+
Engine::Engine() {
singleton = this;
}