summaryrefslogtreecommitdiff
path: root/3ds/3ds_utils.c
diff options
context:
space:
mode:
Diffstat (limited to '3ds/3ds_utils.c')
-rw-r--r--3ds/3ds_utils.c36
1 files changed, 15 insertions, 21 deletions
diff --git a/3ds/3ds_utils.c b/3ds/3ds_utils.c
index a5a5846..aaa9a8a 100644
--- a/3ds/3ds_utils.c
+++ b/3ds/3ds_utils.c
@@ -64,30 +64,24 @@ 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)
- {
- /* ninjhax 1.0 */
- ninjhax_version = 1;
- hbExit();
- khaxInit();
- return 1;
- }
- else
- {
- /* ninjhax 2.0 */
-
+ if(hbInit() == 0)
+ {
+ /* ninjhax 1.0 */
+ ninjhax_version = 1;
+ hbExit();
+ khaxInit();
+ return 1;
+ }
+ ninjhax_version = 2;
return 0;
}
+ /* CFW */
+ ninjhax_version = 0;
+ ctr_enable_all_svc();
+ return 1;
}