haze: get serial number and firmware version from set:sys

This commit is contained in:
Liam committed 2023-04-17 22:22:28 -04:00
1 parent 4b3c801e9f
commit a346014dc7
2 files changed
+17 -7

No files matched your search

+4 -2
View File
@@ -165,11 +165,13 @@ namespace haze {
static const u16 supported_langs[1] = { 0x0409 };
R_TRY(usbDsAddUsbLanguageStringDescriptor(nullptr, supported_langs, util::size(supported_langs)));
/* Initialize set:sys, ensuring we clean up on exit. */
R_TRY(setsysInitialize());
ON_SCOPE_EXIT { setsysExit(); };
/* Get the device serial number. */
SetSysSerialNumber serial;
R_TRY(setsysInitialize());
R_TRY(setsysGetSerialNumber(std::addressof(serial)));
setsysExit();
/* Report strings. */
u8 iManufacturer, iProduct, iSerialNumber;