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

Function GetDeviceType

Sources/Shared/Environment.cpp:208–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206 }
207
208 static DeviceType GetDeviceType()
209 {
210 winrt::hstring deviceFamily = winrtWSP::AnalyticsInfo::VersionInfo().DeviceFamily();
211 if (deviceFamily == L"Windows.Desktop") {
212 return DeviceType::Desktop;
213 } else if (deviceFamily == L"Windows.Mobile" || deviceFamily == L"Windows.Tablet") {
214 return DeviceType::Mobile;
215 } else if (deviceFamily == L"Windows.Iot") {
216 return DeviceType::Iot;
217 } else if (deviceFamily == L"Windows.Xbox") {
218 return DeviceType::Xbox;
219 } else {
220 return DeviceType::Unknown;
221 }
222 }
223
224 const std::uint64_t WindowsVersion = GetWindowsVersion();
225 const DeviceType CurrentDeviceType = GetDeviceType();

Callers 1

Environment.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected