3DSident/source/misc.c
Joel16 99fc2e4c58 Merge upstream changes from GUI
Basically cleaning up and making sure functions succeed before returning the result.
2017-09-15 11:16:13 -05:00

23 lines
353 B
C

#include "am.h"
#include "misc.h"
#include "utils.h"
u32 titleCount(FS_MediaType mediaType)
{
u32 count = 0;
if (R_SUCCEEDED(AM_GetTitleCount(mediaType, &count)))
return count;
return 0;
}
char * getDeviceCert(void)
{
u8 const cert[0x180];
if (R_SUCCEEDED(amNetGetDeviceCert(cert)))
return base64Encode(cert, 0x180);
return NULL;
}