mirror of
https://github.com/LumaTeam/Luma3DS.git
synced 2026-02-22 01:44:38 +00:00
loader: change defaults when kext not present
E.g. if ran through emulation
This commit is contained in:
parent
1399d7ef3b
commit
b15e5fa8d6
@ -10,7 +10,7 @@
|
||||
#include "hbldr.h"
|
||||
|
||||
u32 config, multiConfig, bootConfig;
|
||||
bool isN3DS, isSdMode, nextGamePatchDisabled;
|
||||
bool isN3DS, isSdMode, nextGamePatchDisabled, isLumaWithKext;
|
||||
|
||||
// MAKE SURE fsreg has been init before calling this
|
||||
static Result fsldrPatchPermissions(void)
|
||||
@ -33,7 +33,7 @@ static inline void loadCFWInfo(void)
|
||||
s64 out;
|
||||
u64 hbldrTid = 0;
|
||||
|
||||
bool isLumaWithKext = svcGetSystemInfo(&out, 0x20000, 0) == 1;
|
||||
isLumaWithKext = svcGetSystemInfo(&out, 0x20000, 0) == 1;
|
||||
if (isLumaWithKext)
|
||||
{
|
||||
svcGetSystemInfo(&out, 0x10000, 3);
|
||||
@ -60,7 +60,8 @@ static inline void loadCFWInfo(void)
|
||||
panic(0xDEADCAFE);
|
||||
|
||||
#ifndef BUILD_FOR_EXPLOIT_DEV
|
||||
config = 1u << PATCHVERSTRING; // all options 0, except maybe the MSET version display patch
|
||||
// Most options 0, except select ones
|
||||
config = BIT(PATCHVERSTRING) | BIT(PATCHGAMES) | BIT(LOADEXTFIRMSANDMODULES);
|
||||
#else
|
||||
config = 0;
|
||||
#endif
|
||||
|
||||
@ -966,7 +966,7 @@ void patchCode(u64 progId, u16 progVer, u8 *code, u32 size, u32 textSize, u32 ro
|
||||
countryId,
|
||||
stateId;
|
||||
|
||||
if(loadTitleLocaleConfig(progId, &mask, ®ionId, &languageId, &countryId, &stateId))
|
||||
if(isLumaWithKext && loadTitleLocaleConfig(progId, &mask, ®ionId, &languageId, &countryId, &stateId))
|
||||
svcKernelSetState(0x10001, ((u32)stateId << 24) | ((u32)countryId << 16) | ((u32)languageId << 8) | ((u32)regionId << 4) | (u32)mask , progId);
|
||||
if(!patchLayeredFs(progId, code, size, textSize, roSize, dataSize, roAddress, dataAddress)) goto error;
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ enum singleOptions
|
||||
};
|
||||
|
||||
extern u32 config, multiConfig, bootConfig;
|
||||
extern bool isN3DS, isSdMode, nextGamePatchDisabled;
|
||||
extern bool isN3DS, isSdMode, nextGamePatchDisabled, isLumaWithKext;
|
||||
|
||||
void patchCode(u64 progId, u16 progVer, u8 *code, u32 size, u32 textSize, u32 roSize, u32 dataSize, u32 roAddress, u32 dataAddress);
|
||||
bool loadTitleCodeSection(u64 progId, u8 *code, u32 size);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user