Death::Environment namespace

Platform-specific environment helper functions.

Functions

auto IsSandboxed() -> bool
Returns whether the application is running in a sandboxed environment.
auto GetAppleVersion() -> Containers::String
Returns version of Apple operating system running this application.
auto GetSwitchVersion() -> std::uint32_t
Returns version of Nintendo Switch firmware running this application.
auto HasSwitchAtmosphere() -> bool
Returns true if this device is running Atmosphère custom firmware.
auto GetUnixVersion() -> Containers::String
Returns name and version of Unix system running this application.
auto IsWindowsVista() -> bool
Returns true if this application is running on Windows® Vista or later.
auto IsWindows7() -> bool
Returns true if this application is running on Windows® 7 or later.
auto IsWindows8() -> bool
Returns true if this application is running on Windows® 8 or later.
auto IsWindows10() -> bool
Returns true if this application is running on Windows® 10 or later.
auto IsWindows11() -> bool
Returns true if this application is running on Windows® 11 or later.
auto QueryUnbiasedInterruptTime() -> std::uint64_t
Returns the current unbiased interrupt-time count, in units of 100 nanoseconds.
auto QueryUnbiasedInterruptTimeAsMs() -> std::uint64_t
Returns the current unbiased interrupt-time count, in milliseconds.

Variables

const std::uint64_t WindowsVersion
Version of Windows® operating system running this application.
const DeviceType CurrentDeviceType
Type of device running this application.

Function documentation

bool Death::Environment::IsSandboxed()

Returns whether the application is running in a sandboxed environment.

Returns true if running on iOS, Android, as a macOS app bundle, Windows Phone/Store application or in a browser through Emscripten, false otherwise.

Containers::String Death::Environment::GetAppleVersion()

Returns version of Apple operating system running this application.

std::uint32_t Death::Environment::GetSwitchVersion()

Returns version of Nintendo Switch firmware running this application.

bool Death::Environment::HasSwitchAtmosphere()

Returns true if this device is running Atmosphère custom firmware.

Containers::String Death::Environment::GetUnixVersion()

Returns name and version of Unix system running this application.

bool Death::Environment::IsWindowsVista()

Returns true if this application is running on Windows® Vista or later.

bool Death::Environment::IsWindows7()

Returns true if this application is running on Windows® 7 or later.

bool Death::Environment::IsWindows8()

Returns true if this application is running on Windows® 8 or later.

bool Death::Environment::IsWindows10()

Returns true if this application is running on Windows® 10 or later.

bool Death::Environment::IsWindows11()

Returns true if this application is running on Windows® 11 or later.

std::uint64_t Death::Environment::QueryUnbiasedInterruptTime()

Returns the current unbiased interrupt-time count, in units of 100 nanoseconds.

The unbiased interrupt-time count does not include time the system spends in sleep or hibernation. Falls back to another monotonic time source if not supported.

std::uint64_t Death::Environment::QueryUnbiasedInterruptTimeAsMs()

Returns the current unbiased interrupt-time count, in milliseconds.

The unbiased interrupt-time count does not include time the system spends in sleep or hibernation. Falls back to another monotonic time source if not supported.

Variable documentation

const std::uint64_t Death::Environment::WindowsVersion

Version of Windows® operating system running this application.

const DeviceType Death::Environment::CurrentDeviceType

Type of device running this application.