sys_patch: Clean up patch set logic

This commit is contained in:
Mykola Grymalyuk
2023-07-22 12:40:38 -06:00
parent b9bd01750c
commit e21efa975c
4 changed files with 15 additions and 58 deletions

View File

@@ -273,7 +273,7 @@ class DetectRootPatch:
"""
# Increase OS check if modern wifi is detected
if self.constants.detected_os < os_data.os_data.ventura if self.legacy_wifi is True else os_data.os_data.sonoma:
if self.constants.detected_os < (os_data.os_data.ventura if self.legacy_wifi is True else os_data.os_data.sonoma):
return
if self.legacy_wifi is False and self.modern_wifi is False:
return
@@ -289,7 +289,7 @@ class DetectRootPatch:
oclp_patch_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
if Path(oclp_patch_path).exists():
oclp_plist = plistlib.load(open(oclp_patch_path, "rb"))
if "Legacy Wireless" in oclp_plist:
if "Legacy Wireless" in oclp_plist or "Modern Wireless" in oclp_plist:
return
# Due to the reliance of KDKs for most older patches, we'll allow KDK-less
@@ -312,6 +312,14 @@ class DetectRootPatch:
self.legacy_gmux = False
self.legacy_keyboard_backlight = False
# Currently all graphics patches require a KDK
if self.constants.detected_os >= os_data.os_data.sonoma:
self.kepler_gpu = False
self.ivy_gpu = False
self.haswell_gpu = False
self.broadwell_gpu = False
self.skylake_gpu = False
def _check_dgpu_status(self):
"""