mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-20 02:34:33 +10:00
Resolve Non-Metal Keyboard Backlight support
This commit is contained in:
@@ -471,6 +471,7 @@ class Computer:
|
||||
oclp_version: Optional[str] = None
|
||||
opencore_version: Optional[str] = None
|
||||
bluetooth_chipset: Optional[str] = None
|
||||
ambient_light_sensor: Optional[bool] = False
|
||||
third_party_sata_ssd: Optional[bool] = False
|
||||
|
||||
@staticmethod
|
||||
@@ -486,6 +487,7 @@ class Computer:
|
||||
computer.smbios_probe()
|
||||
computer.cpu_probe()
|
||||
computer.bluetooth_probe()
|
||||
computer.ambient_light_sensor_probe()
|
||||
computer.sata_disk_probe()
|
||||
return computer
|
||||
|
||||
@@ -542,6 +544,12 @@ class Computer:
|
||||
break
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def ambient_light_sensor_probe(self):
|
||||
device = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceNameMatching("ALS0".encode()), None)[1]), None)
|
||||
if device:
|
||||
self.ambient_light_sensor = True
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def usb_controller_probe(self):
|
||||
xhci_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
|
||||
Reference in New Issue
Block a user