libnx  v4.7.0
Macros | Functions
hosversion.h File Reference

Horizon OS (HOS) version detection utilities. More...

#include "../types.h"

Go to the source code of this file.

Macros

#define MAKEHOSVERSION(_major, _minor, _micro)   (((u32)(_major) << 16) | ((u32)(_minor) << 8) | (u32)(_micro))
 Builds a HOS version value from its constituent components.
 
#define HOSVER_MAJOR(_version)   (((_version) >> 16) & 0xFF)
 Extracts the major number from a HOS version value.
 
#define HOSVER_MINOR(_version)   (((_version) >> 8) & 0xFF)
 Extracts the minor number from a HOS version value.
 
#define HOSVER_MICRO(_version)   ( (_version) & 0xFF)
 Extracts the micro number from a HOS version value.
 

Functions

u32 hosversionGet (void)
 Returns the current HOS version that was previously set with hosversionSet. If version initialization fails during startup (such as in the case set:sys is not available), this function returns zero.
 
void hosversionSet (u32 version)
 Sets or overrides the current HOS version. This function is normally called automatically by libnx on startup with the version info obtained with setsysGetFirmwareVersion.
 
bool hosversionIsAtmosphere (void)
 Returns whether the current HOS version is augmented by running the Atmosphère custom firmware.
 
static bool hosversionAtLeast (u8 major, u8 minor, u8 micro)
 Returns true if the current HOS version is equal to or above the specified major/minor/micro version.
 
static bool hosversionBefore (u8 major, u8 minor, u8 micro)
 Returns true if the current HOS version is earlier than the specified major/minor/micro version.
 
static bool hosversionBetween (u8 major1, u8 major2)
 Returns true if the current HOS version is between the two specified major versions, i.e. [major1, major2).
 

Detailed Description

Horizon OS (HOS) version detection utilities.

Author
fincs