From 3ed89e6bd90671d888d9c40f9619eb8a1b63455b Mon Sep 17 00:00:00 2001 From: fincs Date: Tue, 17 May 2016 00:14:00 +0200 Subject: [PATCH] Minor pedantic fix in hb.c --- libctru/source/services/hb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libctru/source/services/hb.c b/libctru/source/services/hb.c index af6e3ea..bbfbc15 100644 --- a/libctru/source/services/hb.c +++ b/libctru/source/services/hb.c @@ -3,7 +3,7 @@ #include <3ds/svc.h> #include <3ds/srv.h> #include <3ds/synchronization.h> -#include <3ds/services/hb.h> +#include <3ds/env.h> #include <3ds/ipc.h> static Handle hbHandle; @@ -13,7 +13,8 @@ Result hbInit(void) { Result res=0; if (AtomicPostIncrement(&hbRefCount)) return 0; - res = srvGetServiceHandle(&hbHandle, "hb:HB"); + Handle temp = envGetHandle("hb:HB"); + res = temp ? svcDuplicateHandle(&hbHandle, temp) : MAKERESULT(RL_STATUS,RS_NOTFOUND,RM_APPLICATION,RD_NOT_FOUND); if (R_FAILED(res)) AtomicDecrement(&hbRefCount); return res; }