cpu_data.py: Adjust enums

This commit is contained in:
Mykola Grymalyuk
2023-06-04 13:36:33 -06:00
parent b5db385cd4
commit 54fcbde01e
13 changed files with 287 additions and 213 deletions
+3 -3
View File
@@ -126,7 +126,7 @@ class BuildMiscellaneous:
# Resolve CoreGraphics.framework crashing on Ivy Bridge in macOS 13.3+
# Ref: https://github.com/acidanthera/RestrictEvents/pull/12
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.cpu_data.ivy_bridge.value:
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.CPUGen.ivy_bridge.value:
logging.info("- Fixing CoreGraphics support on Ivy Bridge")
re_patch_args.append("f16c")
@@ -176,7 +176,7 @@ class BuildMiscellaneous:
"""
# Pre-Force Touch trackpad & keyboard support for macOS Ventura
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.skylake.value:
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.skylake.value:
if self.model.startswith("MacBook"):
# These units got force touch & the new keyboard mapping early, so ignore them
if self.model not in ["MacBookPro11,4", "MacBookPro11,5", "MacBookPro12,1", "MacBook8,1"]:
@@ -248,7 +248,7 @@ class BuildMiscellaneous:
#
# To be paired for sys_patch_dict.py's 'Legacy USB 1.1' patchset
if (
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value or \
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value or \
self.model in ["MacPro4,1", "MacPro5,1"]
):
logging.info("- Adding UHCI/OHCI USB support")