mirror of
https://github.com/NinjaCheetah/WiiPy.git
synced 2025-06-29 07:31:02 -04:00
Add argument to apply experimental DI patch to IOS
This commit is contained in:
parent
304539b120
commit
bb3c2737e5
@ -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}")
|
||||
|
||||
|
2
wiipy.py
2
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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user