diff options
author | MJacred <loesch.benny92@gmx.de> | 2022-09-16 11:14:14 +0200 |
---|---|---|
committer | MJacred <loesch.benny92@gmx.de> | 2022-09-16 11:17:36 +0200 |
commit | ac9786c52534cc98c107edf568656f33a81fa2a0 (patch) | |
tree | b4aea71462783d2165283f37f4476db950058854 /platform/uwp | |
parent | d1b2a191ab752ebd8236e3547e07b6eb3bb1f260 (diff) |
Add get_distribution_name() and get_version() to OS
supports: LinuxBSD, Windows, macOS, iOS, Android, UWP
Co-authored-by: bruvzg
Diffstat (limited to 'platform/uwp')
-rw-r--r-- | platform/uwp/os_uwp.cpp | 10 | ||||
-rw-r--r-- | platform/uwp/os_uwp.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index 791328964b..8050d299f0 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -444,6 +444,16 @@ String OS_UWP::get_name() const { return "UWP"; } +String OS_UWP::get_distribution_name() const { + return get_name(); +} + +String OS_UWP::get_version() const { + winrt::hstring df_version = VersionInfo().DeviceFamilyVersion(); + static String version = String(winrt::to_string(df_version).c_str()); + return version; +} + OS::DateTime OS_UWP::get_datetime(bool p_utc) const { SYSTEMTIME systemtime; if (p_utc) { diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index 7d4224cf74..0c1c4a793a 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -183,6 +183,8 @@ public: virtual MainLoop *get_main_loop() const; virtual String get_name() const; + virtual String get_distribution_name() const; + virtual String get_version() const; virtual DateTime get_datetime(bool p_utc) const; virtual TimeZoneInfo get_time_zone_info() const; |