From: fincs Date: Mon, 16 May 2016 22:14:00 +0000 (+0200) Subject: Minor pedantic fix in hb.c X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=3ed89e6bd90671d888d9c40f9619eb8a1b63455b;p=corbenik%2Fctrulib.git Minor pedantic fix in hb.c --- 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; }