MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / GetAmsConfig

Function GetAmsConfig

libs/uCommon/source/ul/os/os_System.cpp:44–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 }
43
44 void GetAmsConfig(ul::Version &out_ams_version, bool &out_is_emummc) {
45 UL_RC_ASSERT(splInitialize());
46 // Since we rely on ams for uLaunch to work, it *must* be present
47 u64 raw_ams_ver;
48 UL_RC_ASSERT(splGetConfig(static_cast<SplConfigItem>(ExosphereApiVersionConfigItem), &raw_ams_ver));
49 out_ams_version = {
50 .major = static_cast<u8>((raw_ams_ver >> 56) & 0xFF),
51 .minor = static_cast<u8>((raw_ams_ver >> 48) & 0xFF),
52 .micro = static_cast<u8>((raw_ams_ver >> 40) & 0xFF)
53 };
54 u64 emummc_type;
55 UL_RC_ASSERT(splGetConfig(static_cast<SplConfigItem>(ExosphereEmuMMCType), &emummc_type));
56 out_is_emummc = emummc_type != 0;
57 splExit();
58 }
59
60 bool IsEmuMMC() {
61 if(g_GotIsEmuMMC) {

Callers 1

InitializeSettingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected