From d2aae675e92cbe99706564e2cffbc34ed7cea639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 13 Jan 2017 18:25:43 +0100 Subject: Replace Engine version API by preexisting OS one It outputs a single Dictionary with all relevant information as keys, that will less bloat the documentation and provide all details in one function call. --- core/os/os.cpp | 29 ++++------------------------- core/os/os.h | 2 -- 2 files changed, 4 insertions(+), 27 deletions(-) (limited to 'core/os') diff --git a/core/os/os.cpp b/core/os/os.cpp index db7b7cb943..f4c13dabcc 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -27,13 +27,13 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "os.h" -#include "os/file_access.h" -#include + #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" +#include "os/file_access.h" + +#include OS* OS::singleton=NULL; @@ -512,27 +512,6 @@ bool OS::is_vsync_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; diff --git a/core/os/os.h b/core/os/os.h index 4c34ff92f9..ea03481a92 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -402,8 +402,6 @@ public: virtual void set_use_vsync(bool p_enable); virtual bool is_vsync_enabled() const; - Dictionary get_engine_version() const; - bool is_hidpi_allowed() const { return _allow_hidpi; } OS(); virtual ~OS(); -- cgit v1.2.3