Death::Environment namespace

Platform-specific environment helper functions.

Enums

enum class ElevationState { Unknown, Limited, Full }
Elevation state.

Functions

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

Properties

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

Enum documentation

enum class Death::Environment::ElevationState

Elevation state.

Enumerators
Unknown

Unknown, the elevation state could not be obtained

Limited

Limited, the process has limited privileges

Full

Full, the process has elevated privileges

Function documentation

bool Death::Environment::IsEmbedded()

Returns whether the application is embedded in another application (or in an <iframe> element)

bool Death::Environment::IsSandboxed()

Returns whether the application is currently 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 currently running this application.

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

Returns version of Nintendo Switch firmware currently running this application.

bool Death::Environment::HasSwitchAtmosphere()

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

Containers::String Death::Environment::GetUnixFlavor()

Returns name and version of Unix system currently running this application.

bool Death::Environment::IsWindowsVista() noexcept

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

bool Death::Environment::IsWindows7() noexcept

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

bool Death::Environment::IsWindows8() noexcept

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

bool Death::Environment::IsWindows10() noexcept

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

bool Death::Environment::IsWindows11() noexcept

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

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

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

The unbiased interrupt-time count is monotonic time source that 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() noexcept

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

The unbiased interrupt-time count is monotonic time source that 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::QueryCoarseInterruptTimeAsMs() noexcept

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

The coarse interrupt-time count is fast, monotonic time source with a resolution typically limited to 16 milliseconds. Falls back to another monotonic time source if not supported.

Variable documentation

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

Version of Windows® operating system currently running this application.

const DeviceType Death::Environment::CurrentDeviceType

Type of device currently running this application.