fixed hb naming

This commit is contained in:
smea 2014-12-24 21:06:09 -08:00
parent 01e939aba9
commit 7f0d169c10
2 changed files with 9 additions and 5 deletions

View File

@ -7,8 +7,8 @@
#include <3ds/types.h> #include <3ds/types.h>
Result initHb(); Result hbInit();
void exitHb(); void hbExit();
// flushes/invalidates entire data/instruction cache // flushes/invalidates entire data/instruction cache
// can be useful when writing code to executable pages // can be useful when writing code to executable pages

View File

@ -5,12 +5,12 @@
static Handle hbHandle; static Handle hbHandle;
Result initHb() Result hbInit()
{ {
return srvGetServiceHandle(&hbHandle, "hb:HB"); return srvGetServiceHandle(&hbHandle, "hb:HB");
} }
void exitHb() void hbExit()
{ {
svcCloseHandle(hbHandle); svcCloseHandle(hbHandle);
} }
@ -57,7 +57,11 @@ Result HB_ReprotectMemory(u32* addr, u32 pages, u32 mode, u32* reprotectedPages)
if((ret = svcSendSyncRequest(hbHandle))!=0) return ret; if((ret = svcSendSyncRequest(hbHandle))!=0) return ret;
if(reprotectedPages)*reprotectedPages=(u32)cmdbuf[2]; if(reprotectedPages)
{
if(!ret)*reprotectedPages=(u32)cmdbuf[2];
else *reprotectedPages=0;
}
return (Result)cmdbuf[1]; return (Result)cmdbuf[1];
} }