Closed kcpants closed 1 year ago
Does this also work with drives hidden via USTEALTH
?
Yes, I can confirm this fix is compatible with drives hidden with Ustealth. The Wii USB drive attached to my Wii U is hidden with ustealth.
Ustealth alters the bytes that are used to identify the boot sector as MBR but leaves the "partition bytes" untouched.
This fix adds a sanity check to the loop in
__usbstorage_ogc_IsInserted
which reads the MBR sector of the USB storage drive and skips over drives whose partition type is "Unknown" (according to the logic in thePartFromType
function defined inPartitionHandle.cpp
). Since the relevant cpp structs and functions defined inPartitionHandle
are not available, we access the raw byte containing the partition type directly by calculating its offset within the MBR sector.