mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
Fix
This commit is contained in:
+16
-12
@@ -622,6 +622,8 @@ class Computer:
|
|||||||
computer.usb_device_probe()
|
computer.usb_device_probe()
|
||||||
computer.cpu_probe()
|
computer.cpu_probe()
|
||||||
computer.bluetooth_probe()
|
computer.bluetooth_probe()
|
||||||
|
computer.keyboard_probe()
|
||||||
|
computer.trackpad_probe()
|
||||||
computer.ambient_light_sensor_probe()
|
computer.ambient_light_sensor_probe()
|
||||||
computer.sata_disk_probe()
|
computer.sata_disk_probe()
|
||||||
computer.oclp_sys_patch_probe()
|
computer.oclp_sys_patch_probe()
|
||||||
@@ -886,25 +888,27 @@ class Computer:
|
|||||||
if not self.usb_devices:
|
if not self.usb_devices:
|
||||||
return
|
return
|
||||||
|
|
||||||
legacy_ids = ["526","527","528","532","533","534","525","536","537","538","539","540","553","554","555"] # These keyboards were stripped of their personalities after being dropped
|
legacy_ids = [526,527,528,532,533,534,525,536,537,538,539,540,553,554,555] # These keyboards were stripped of their personalities after being dropped
|
||||||
modern_ids = ["547","548","549","560","561","562","566","567","568","575","576","577","578","579","580","581","582","583","585","586","587","601","602","603","610","611","612","588","589","590","594","595","596"] #These keyboards remained in AppleUSBTCKeyboard until the kext was removed
|
modern_ids = [547,548,549,560,561,562,566,567,568,575,576,577,578,579,580,581,582,583,585,586,587,601,602,603,610,611,612,588,589,590,594,595,596] #These keyboards remained in AppleUSBTCKeyboard until the kext was removed
|
||||||
|
|
||||||
if any(value in usb_device.product_name and usb_device.vendor_id == "1452" for value in legacy_ids for usb_device in self.usb_devices):
|
for usb_device in self.usb_devices:
|
||||||
self.keyboard_type = "Legacy"
|
if usb_device.device_id in legacy_ids and usb_device.vendor_id == 1452:
|
||||||
elif any(value in usb_device.product_name and usb_device.vendor_id == "1452" for value in modern_ids for usb_device in self.usb_devices):
|
self.keyboard_type = "Legacy"
|
||||||
self.keyboard_type = "Modern"
|
elif usb_device.device_id in modern_ids and usb_device.vendor_id == 1452:
|
||||||
|
self.keyboard_type = "Modern"
|
||||||
|
|
||||||
def trackpad_probe(self):
|
def trackpad_probe(self):
|
||||||
if not self.usb_devices:
|
if not self.usb_devices:
|
||||||
return
|
return
|
||||||
|
|
||||||
legacy_ids = ["526","527","528","778","779","532","533","534","535","536","537","538","539","540","553","554","555"] # Overlap with keyboard IDs as some units have unified USB topcase devices
|
legacy_ids = [526,527,528,778,779,532,533,534,535,536,537,538,539,540,553,554,555] # Overlap with keyboard IDs as some units have unified USB topcase devices
|
||||||
modern_ids = ["547","548","549","560","561","562","566","567","568","575","576","577","578","579","580","581","582","583","585","586","587","601","602","603","610","611","612","588","589","590","594","595","596"]
|
modern_ids = [547,548,549,560,561,562,566,567,568,575,576,577,578,579,580,581,582,583,585,586,587,601,602,603,610,611,612,588,589,590,594,595,596]
|
||||||
|
|
||||||
if any(value in usb_device.product_name and usb_device.vendor_id == "1452" for value in legacy_ids for usb_device in self.usb_devices):
|
for usb_device in self.usb_devices:
|
||||||
self.trackpad_type = "Legacy"
|
if usb_device.device_id in legacy_ids and usb_device.vendor_id == 1452:
|
||||||
elif any(value in usb_device.product_name and usb_device.vendor_id == "1452" for value in modern_ids for usb_device in self.usb_devices):
|
self.trackpad_type = "Legacy"
|
||||||
self.trackpad_type = "Modern"
|
elif usb_device.device_id in modern_ids and usb_device.vendor_id == 1452:
|
||||||
|
self.trackpad_type = "Modern"
|
||||||
|
|
||||||
|
|
||||||
def sata_disk_probe(self):
|
def sata_disk_probe(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user