Use kernel version minor

This commit is contained in:
TuxSH
2020-05-02 12:35:44 +01:00
parent 6931eadc34
commit 43fd137d55
7 changed files with 22 additions and 11 deletions

View File

@@ -301,7 +301,7 @@ void HBLDR_HandleCommands(void *ctx)
kcaps0->descriptors[0] = 0xFC000000 | (osGetKernelVersion() >> 16);
u64 lastdep = sizeof(dependencyList)/8;
if (osGetFirmVersion() >= SYSTEM_VERSION(2,50,0)) // 9.6+ FIRM
if (GET_VERSION_MINOR(osGetKernelVersion()) >= 50) // 9.6+ FIRM
{
exhi->sci.dependencies[lastdep++] = 0x0004013000004002ULL; // nfc
strncpy((char*)&localcaps0->service_access[0x20], "nfc:u", 8);

View File

@@ -273,7 +273,7 @@ Result InputRedirection_DoOrUndoPatches(void)
svcCloseHandle(processHandle);
res = OpenProcessByName("ir", &processHandle);
if(R_SUCCEEDED(res) && osGetKernelVersion() >= SYSTEM_VERSION(2, 44, 6))
if(R_SUCCEEDED(res) && GET_VERSION_MINOR(osGetKernelVersion()) >= 44)
{
svcGetProcessInfo(&textTotalRoundedSize, processHandle, 0x10002); // only patch .text + .data
svcGetProcessInfo(&rodataTotalRoundedSize, processHandle, 0x10003);