add quick luma detection getinfo

This commit is contained in:
TuxSH 2020-04-28 10:42:30 +01:00
parent 5924f60d06
commit c7a3a0278c
2 changed files with 22 additions and 8 deletions

View File

@ -83,6 +83,7 @@ Result GetSystemInfoHook(s64 *out, s32 type, s32 param)
break;
default:
*out = 0;
res = 0xF8C007F4; // not implemented
break;
}
@ -105,13 +106,16 @@ Result GetSystemInfoHook(s64 *out, s32 type, s32 param)
*out = L2C_CTRL & 1;
break;
default:
*out = 0;
res = 0xF8C007F4;
break;
}
}
else
{
*out = 0;
res = 0xF8C007F4;
}
break;
}
@ -128,7 +132,10 @@ Result GetSystemInfoHook(s64 *out, s32 type, s32 param)
if((u32)param <= getNumberOfCores())
*out = L1MMUTableAddrs[param - 1];
else
{
*out = 0;
res = 0xF8C007F4;
}
break;
}
@ -136,6 +143,13 @@ Result GetSystemInfoHook(s64 *out, s32 type, s32 param)
break;
}
case 0x20000:
{
*out = 0;
return 1;
}
default:
GetSystemInfo(out, type, param);
break;

View File

@ -29,18 +29,18 @@ static inline void loadCFWInfo(void)
{
s64 out;
assertSuccess(svcGetSystemInfo(&out, 0x10000, 3));
if(svcGetSystemInfo(&out, 0x20000, 0) != 1) panic(0xDEADCAFE);
svcGetSystemInfo(&out, 0x10000, 3);
config = (u32)out;
assertSuccess(svcGetSystemInfo(&out, 0x10000, 4));
svcGetSystemInfo(&out, 0x10000, 4);
multiConfig = (u32)out;
assertSuccess(svcGetSystemInfo(&out, 0x10000, 5));
svcGetSystemInfo(&out, 0x10000, 5);
bootConfig = (u32)out;
assertSuccess(svcGetSystemInfo(&out, 0x10000, 0x201));
svcGetSystemInfo(&out, 0x10000, 0x201);
isN3DS = (bool)out;
//assertSuccess(svcGetSystemInfo(&out, 0x10000, 0x202));
//needToInitSd = (bool)out;
assertSuccess(svcGetSystemInfo(&out, 0x10000, 0x203));
svcGetSystemInfo(&out, 0x10000, 0x203);
isSdMode = (bool)out;
}