diff options
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r-- | core/os/os.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp index 89ba73b35e..7505f3ff34 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -146,6 +146,10 @@ bool OS::is_stdout_verbose() const { return _verbose_stdout; } +bool OS::is_single_window() const { + return _single_window; +} + bool OS::is_stdout_debug_enabled() const { return _debug_stdout; } @@ -227,6 +231,12 @@ String OS::get_locale() const { return "en"; } +// Non-virtual helper to extract the 2 or 3-letter language code from +// `get_locale()` in a way that's consistent for all platforms. +String OS::get_locale_language() const { + return get_locale().left(3).replace("_", ""); +} + // Helper function to ensure that a dir name/path will be valid on the OS String OS::get_safe_dir_name(const String &p_dir_name, bool p_allow_dir_separator) const { Vector<String> invalid_chars = String(": * ? \" < > |").split(" "); |