(ctr/3ds) better detection of cia builds.

This commit is contained in:
aliaspider 2015-10-20 23:17:20 +01:00
parent 98d327daa5
commit 67ed544c01
1 changed files with 15 additions and 21 deletions

View File

@ -64,17 +64,10 @@ void ctr_flush_invalidate_cache(void)
int ctr_svchack_init(void)
{
Handle tempHandle;
Result res = srvGetServiceHandle(&tempHandle, "am:u");
if(res == 0)
extern unsigned int __service_ptr;
if(__service_ptr)
{
/* CFW */
svcCloseHandle(tempHandle);
ninjhax_version = 0;
ctr_enable_all_svc();
return 1;
}
else if(hbInit() == 0)
if(hbInit() == 0)
{
/* ninjhax 1.0 */
ninjhax_version = 1;
@ -82,12 +75,13 @@ int ctr_svchack_init(void)
khaxInit();
return 1;
}
else
{
/* ninjhax 2.0 */
ninjhax_version = 2;
return 0;
}
/* CFW */
ninjhax_version = 0;
ctr_enable_all_svc();
return 1;
}