diff --git a/modules/title/iospatcher.py b/modules/title/iospatcher.py index 63be8c5..27d3476 100644 --- a/modules/title/iospatcher.py +++ b/modules/title/iospatcher.py @@ -45,6 +45,16 @@ def patch_version_downgrading(ios_patcher: libWiiPy.title.IOSPatcher) -> int: return count +def patch_drive_inquiry(ios_patcher: libWiiPy.title.IOSPatcher) -> int: + print("Applying drive inquiry patch... ", end="", flush=True) + count = ios_patcher.patch_drive_inquiry() + if count == 1: + print(f"{count} patch applied") + else: + print(f"{count} patches applied") + return count + + def handle_iospatch(args): input_path = pathlib.Path(args.input) if not input_path.exists(): @@ -85,6 +95,8 @@ def handle_iospatch(args): patch_count += patch_nand_access(ios_patcher) if args.version_downgrading is True: patch_count += patch_version_downgrading(ios_patcher) + if args.drive_inquiry is True: + patch_count += patch_drive_inquiry(ios_patcher) print(f"\nTotal patches applied: {patch_count}") diff --git a/wiipy.py b/wiipy.py index 62fa348..9b596fc 100644 --- a/wiipy.py +++ b/wiipy.py @@ -70,6 +70,8 @@ if __name__ == "__main__": iospatch_parser.add_argument("-na", "--nand-access", action="store_true", help="patch in /dev/flash access") iospatch_parser.add_argument("-vd", "--version-downgrading", action="store_true", help="patch in version downgrading support") + iospatch_parser.add_argument("-di", "--drive-inquiry", action="store_true", + help="patches out the drive inquiry check") iospatch_parser.add_argument("-v", "--version", metavar="VERSION", type=int, help="set the IOS version") iospatch_parser.add_argument("-s", "--slot", metavar="SLOT", type=int, help="set the slot that this IOS will install to")