MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / GetWindowsVersion

Function GetWindowsVersion

Sources/Shared/Environment.cpp:195–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193#if defined(DEATH_TARGET_WINDOWS)
194# if defined(DEATH_TARGET_WINDOWS_RT)
195 static std::uint64_t GetWindowsVersion()
196 {
197 winrt::hstring versionString = winrtWSP::AnalyticsInfo::VersionInfo().DeviceFamilyVersion();
198 wchar_t* versionStringEnd;
199 std::uint64_t version = wcstoull(versionString.begin(), &versionStringEnd, 10);
200
201 std::uint64_t major = (version & 0xFFFF000000000000L) >> 48;
202 std::uint64_t minor = (version & 0x0000FFFF00000000L) >> 32;
203 std::uint64_t build = (version & 0x00000000FFFF0000L) >> 16;
204
205 return build | ((minor & 0xFFFFull) << 32) | ((major & 0xFFFFull) << 48);
206 }
207
208 static DeviceType GetDeviceType()
209 {

Callers 1

Environment.cppFile · 0.85

Calls 1

beginMethod · 0.45

Tested by

no test coverage detected