Check each device requiring OpenCore Legacy Patcher for proper configuration

This commit is contained in:
Hoang Hong Quan
2024-11-06 18:30:27 +07:00
parent 7bb7858507
commit 03e6f5eea9
2 changed files with 10 additions and 6 deletions
+5 -1
View File
@@ -280,7 +280,8 @@ class CompatibilityChecker:
new_hardware_report[device_type] = {}
for device_name, device_props in devices.items():
for device_name in devices:
device_props = devices[device_name].copy()
if device_props.get("OCLP Compatibility") and self.utils.parse_darwin_version(device_props.get("OCLP Compatibility")[0]) >= self.utils.parse_darwin_version(macos_verison) >= self.utils.parse_darwin_version(device_props.get("OCLP Compatibility")[-1]):
new_hardware_report[device_type][device_name] = device_props
needs_oclp = True
@@ -296,6 +297,9 @@ class CompatibilityChecker:
else:
new_hardware_report[device_type][device_name] = device_props
if new_hardware_report[device_type].get(device_name) and new_hardware_report[device_type][device_name].get("OCLP Compatibility"):
del new_hardware_report[device_type][device_name]["OCLP Compatibility"]
if not new_hardware_report[device_type]:
del new_hardware_report[device_type]