From 4dc76e26fcc00e2030872f264dcf12e7b400c50f Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Wed, 7 Jul 2021 18:54:55 -0600 Subject: [PATCH] Fix formatting --- OpenCore-Patcher.command | 2 +- Resources/Build.py | 21 +++++++++++---------- Resources/CliMenu.py | 11 ++++++----- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/OpenCore-Patcher.command b/OpenCore-Patcher.command index 4e4bf5dd7..6edeb2a7a 100755 --- a/OpenCore-Patcher.command +++ b/OpenCore-Patcher.command @@ -116,7 +116,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier' [f"Allow FireWire Boot:\t\tCurrently {self.constants.firewire_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_firewire], [f"Allow NVMe Boot:\t\t\tCurrently {self.constants.nvme_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_nvme], [f"Allow Wake on WLAN:\t\t\tCurrently {self.constants.enable_wake_on_wlan}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_wowl], - [f"Allow Ivy iMac iGPU:\t\t\tCurrently {self.constants.allow_ivy_igpu}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_ivy], + [f"Allow Ivy iMac iGPU:\t\tCurrently {self.constants.allow_ivy_igpu}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_ivy], [f"Disable AMFI:\t\t\tCurrently {self.constants.disable_amfi}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_amfi], [ f"Set SIP and SecureBootModel:\tSIP: {self.constants.sip_status} SBM: {self.constants.secure_status}", diff --git a/Resources/Build.py b/Resources/Build.py index 8a0ee6877..9463bd416 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -411,16 +411,17 @@ class BuildOpenCore: self.config["DeviceProperties"]["Add"][self.gfx0_path] = {"agdpmod": "vit9696"} if self.model in ["iMac13,1", "iMac13,2", "iMac13,3"]: - if self.computer.dgpu and self.constants.allow_ivy_igpu is False: - print("- Disabling iGPU to fix sleep support in macOS 12") - self.config["DeviceProperties"]["Add"][self.gfx0_path] = {"agdpmod": "vit9696", "shikigva": 256} - self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = { - "name": binascii.unhexlify("23646973706C6179"), - "IOName": "#display", - "class-code": binascii.unhexlify("FFFFFFFF"), - } - elif self.constants.allow_ivy_igpu is True: - print("- Enabling iGPU upon request") + if self.computer.dgpu: + if self.constants.allow_ivy_igpu is False: + print("- Disabling iGPU to fix sleep support in macOS 12") + self.config["DeviceProperties"]["Add"][self.gfx0_path] = {"agdpmod": "vit9696", "shikigva": 256} + self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = { + "name": binascii.unhexlify("23646973706C6179"), + "IOName": "#display", + "class-code": binascii.unhexlify("FFFFFFFF"), + } + else: + print("- Enabling iGPU upon request") # Audio Patch if self.model in ModelArray.LegacyAudio: diff --git a/Resources/CliMenu.py b/Resources/CliMenu.py index c1759baab..40f1f72a8 100644 --- a/Resources/CliMenu.py +++ b/Resources/CliMenu.py @@ -506,13 +506,14 @@ be prepared if enabling. print( """ For iMac13,x systems with a Nvidia dGPU, the iGPU is disabled by default to -allow Delta Updates, FileVault, SIP and such on macOS Monterey. However due to this, -DRM and QuickSync support may be broken. +allow Delta Updates, FileVault, SIP and such on macOS Monterey. However due to +this, DRM and QuickSync support may be broken. -Users can choose to override this option but be aware SIP and FileVault must be disabled -to run root patches to fix DRM and QuickSync. +Users can choose to override this option but be aware SIP and FileVault must be +disabled to run root patches to fix DRM and QuickSync. -Note: This does not apply for Big Sur, the iGPU can be renabled without consequence +Note: This does not apply for Big Sur, the iGPU can be renabled without +consequence Note 2: This setting only affects iMac13,x with dGPUs """ )