mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 04:22:50 +02:00
envSetup: detect Atmosphère environment using EntryType_HosVersion
This commit is contained in:
parent
ca9d007bd4
commit
de97b82bce
@ -101,9 +101,14 @@ void envSetup(void* ctx, Handle main_thread, LoaderReturnFn saved_lr)
|
|||||||
g_userIdStorage = (AccountUid*)(uintptr_t)ent->Value[0];
|
g_userIdStorage = (AccountUid*)(uintptr_t)ent->Value[0];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EntryType_HosVersion:
|
case EntryType_HosVersion: {
|
||||||
hosversionSet(ent->Value[0]);
|
u32 version = ent->Value[0];
|
||||||
|
if (ent->Value[1] == 0x41544d4f53504852UL) { // 'ATMOSPHR'
|
||||||
|
version |= BIT(31);
|
||||||
|
}
|
||||||
|
hosversionSet(version);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (ent->Flags & EntryFlag_IsMandatory)
|
if (ent->Flags & EntryFlag_IsMandatory)
|
||||||
|
Loading…
Reference in New Issue
Block a user