Lockpick/source/nx/set_ext.c

26 lines
530 B
C
Raw Normal View History

2018-12-08 02:17:01 +01:00
#include "set_ext.h"
2019-10-30 12:19:45 +01:00
#include "../service_guard.h"
#include <switch/services/sm.h>
#include <switch/types.h>
2018-12-08 02:17:01 +01:00
static Service g_setcalSrv;
2019-10-30 12:19:45 +01:00
NX_GENERATE_SERVICE_GUARD(setcal);
2018-12-08 02:17:01 +01:00
2019-10-30 12:19:45 +01:00
Result _setcalInitialize() {
2018-12-08 02:17:01 +01:00
return smGetService(&g_setcalSrv, "set:cal");
}
2019-10-30 12:19:45 +01:00
void _setcalCleanup() {
serviceClose(&g_setcalSrv);
2018-12-08 02:17:01 +01:00
}
2019-10-30 12:19:45 +01:00
Result setcalGetEticketDeviceKey(void *key)
{
return serviceDispatch(&g_setcalSrv, 21,
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
.buffers = { { key, 0x244 } },
);
2018-12-08 02:17:01 +01:00
}