(ctr/3ds) better detection of cia builds.
This commit is contained in:
		
							parent
							
								
									98d327daa5
								
							
						
					
					
						commit
						67ed544c01
					
				
					 1 changed files with 15 additions and 21 deletions
				
			
		| 
						 | 
					@ -64,17 +64,10 @@ void ctr_flush_invalidate_cache(void)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int ctr_svchack_init(void)
 | 
					int ctr_svchack_init(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
   Handle tempHandle;
 | 
					   extern unsigned int __service_ptr;
 | 
				
			||||||
   Result res = srvGetServiceHandle(&tempHandle, "am:u");
 | 
					   if(__service_ptr)
 | 
				
			||||||
   if(res == 0)
 | 
					 | 
				
			||||||
   {
 | 
					   {
 | 
				
			||||||
      /* CFW */
 | 
					      if(hbInit() == 0)
 | 
				
			||||||
      svcCloseHandle(tempHandle);
 | 
					 | 
				
			||||||
      ninjhax_version = 0;
 | 
					 | 
				
			||||||
      ctr_enable_all_svc();
 | 
					 | 
				
			||||||
      return 1;
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
   else if(hbInit() == 0)
 | 
					 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
         /* ninjhax 1.0 */
 | 
					         /* ninjhax 1.0 */
 | 
				
			||||||
         ninjhax_version = 1;
 | 
					         ninjhax_version = 1;
 | 
				
			||||||
| 
						 | 
					@ -82,12 +75,13 @@ int ctr_svchack_init(void)
 | 
				
			||||||
         khaxInit();
 | 
					         khaxInit();
 | 
				
			||||||
         return 1;
 | 
					         return 1;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
   else
 | 
					      ninjhax_version = 2;
 | 
				
			||||||
   {
 | 
					 | 
				
			||||||
      /* ninjhax 2.0 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      return 0;
 | 
					      return 0;
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					   /* CFW */
 | 
				
			||||||
 | 
					   ninjhax_version = 0;
 | 
				
			||||||
 | 
					   ctr_enable_all_svc();
 | 
				
			||||||
 | 
					   return 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue