haze: get serial number and firmware version from set:sys
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user