diff options
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r-- | core/os/os.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp index e501bc2eb5..5f86962048 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -32,6 +32,8 @@ #include "dir_access.h" #include "globals.h" #include "input.h" +// For get_engine_version, could be removed if it's moved to a new Engine singleton +#include "version.h" OS* OS::singleton=NULL; @@ -207,18 +209,15 @@ bool OS::has_virtual_keyboard() const { return false; } -void OS::show_virtual_keyboard(const String& p_existing_text,const Rect2& p_screen_rect) { - +void OS::show_virtual_keyboard(const String& p_existing_text,const Rect2& p_screen_rect) { } void OS::hide_virtual_keyboard(){ - } - void OS::print_all_resources(String p_to_file) { ERR_FAIL_COND(p_to_file!="" && _OSPRF); @@ -548,6 +547,28 @@ bool OS::is_vsnc_enabled() const{ return true; } +Dictionary OS::get_engine_version() const { + + Dictionary dict; + dict["major"] = _MKSTR(VERSION_MAJOR); + dict["minor"] = _MKSTR(VERSION_MINOR); +#ifdef VERSION_PATCH + dict["patch"] = _MKSTR(VERSION_PATCH); +#else + dict["patch"] = ""; +#endif + dict["status"] = _MKSTR(VERSION_STATUS); + dict["revision"] = _MKSTR(VERSION_REVISION); + + String stringver = String(dict["major"]) + "." + String(dict["minor"]); + if (dict["patch"] != "") + stringver += "." + String(dict["patch"]); + stringver += "-" + String(dict["status"]) + " (" + String(dict["revision"]) + ")"; + dict["string"] = stringver; + + return dict; +} + OS::OS() { last_error=NULL; frames_drawn=0; |