set.c 396 B

1234567891011121314151617181920212223
  1. #include <stdint.h>
  2. #include <stdbool.h>
  3. #include <switch.h>
  4. #include "nx/set.h"
  5. bool init_set(void)
  6. {
  7. return R_FAILED(setsysInitialize()) ? false : true;
  8. }
  9. void exit_set(void)
  10. {
  11. setsysExit();
  12. }
  13. uint16_t get_sys_fw_version(void)
  14. {
  15. SetSysFirmwareVersion fw_ver = {0};
  16. setsysGetFirmwareVersion(&fw_ver);
  17. return (fw_ver.major * 100) + (fw_ver.minor * 10) + (fw_ver.micro);
  18. }