From c78f7d0bdb1207eb81e9e6b1bd8e384fb91dd130 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Tue, 20 Apr 2021 09:11:56 -0600 Subject: [PATCH] Fix crashing on custom models --- OCLP-CLI.command | 2 +- Resources/Build.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OCLP-CLI.command b/OCLP-CLI.command index af28cde42..a5e73d135 100755 --- a/OCLP-CLI.command +++ b/OCLP-CLI.command @@ -29,7 +29,7 @@ class OpenCoreLegacyPatcher(): self.constants.serial_settings = "Moderate" if self.current_model in ModelArray.LegacyGPU: Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).check_pciid(False) - if not (self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs) or not (self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs): + if not (self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs) or not (self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs): self.constants.sip_status = False self.constants.secure_status = False diff --git a/Resources/Build.py b/Resources/Build.py index cd7d3b736..ff51975ea 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -318,9 +318,9 @@ class BuildOpenCore: print("- Failed to find vendor") elif not self.constants.custom_model: self.check_pciid(True) - if self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs: + if self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs: amd_patch(self) - elif self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs: + elif self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs: nvidia_patch(self) if self.model in ModelArray.MacPro71: print("- Adding Mac Pro, Xserve DRM patches") @@ -416,7 +416,7 @@ class BuildOpenCore: print("- Spoofing to iMacPro1,1") spoofed_model = "iMacPro1,1" spoofed_board = "Mac-7BA5B2D9E42DDD94" - elif self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs: + elif self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs and not self.constants.custom_model: print("- Spoofing to iMacPro1,1") spoofed_model = "iMacPro1,1" spoofed_board = "Mac-7BA5B2D9E42DDD94"