mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 03:50:14 +10:00
sys_patch_dict.py: Adjust Display Name variable
This commit is contained in:
@@ -22,7 +22,7 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
|
|||||||
sys_patch_dict = {
|
sys_patch_dict = {
|
||||||
"Graphics": {
|
"Graphics": {
|
||||||
"Non-Metal Common": {
|
"Non-Metal Common": {
|
||||||
"Display Name": None,
|
"Display Name": "",
|
||||||
"OS Support": {
|
"OS Support": {
|
||||||
"Minimum OS Support": {
|
"Minimum OS Support": {
|
||||||
"OS Major": non_metal_os_support[0],
|
"OS Major": non_metal_os_support[0],
|
||||||
@@ -86,7 +86,7 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
|
|||||||
"Non-Metal IOAccelerator Common": {
|
"Non-Metal IOAccelerator Common": {
|
||||||
# TeraScale 2 and Nvidia Web Drivers broke in Mojave due to mismatched structs in
|
# TeraScale 2 and Nvidia Web Drivers broke in Mojave due to mismatched structs in
|
||||||
# the IOAccelerator stack
|
# the IOAccelerator stack
|
||||||
"Display Name": None,
|
"Display Name": "",
|
||||||
"OS Support": {
|
"OS Support": {
|
||||||
"Minimum OS Support": {
|
"Minimum OS Support": {
|
||||||
"OS Major": non_metal_os_support[0],
|
"OS Major": non_metal_os_support[0],
|
||||||
@@ -118,7 +118,7 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Metal Common": {
|
"Metal Common": {
|
||||||
"Display Name": None,
|
"Display Name": "",
|
||||||
"OS Support": {
|
"OS Support": {
|
||||||
"Minimum OS Support": {
|
"Minimum OS Support": {
|
||||||
"OS Major": os_data.os_data.monterey,
|
"OS Major": os_data.os_data.monterey,
|
||||||
@@ -142,7 +142,7 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Legacy GVA": {
|
"Legacy GVA": {
|
||||||
"Display Name": None,
|
"Display Name": "",
|
||||||
"OS Support": {
|
"OS Support": {
|
||||||
"Minimum OS Support": {
|
"Minimum OS Support": {
|
||||||
"OS Major": non_metal_os_support[0],
|
"OS Major": non_metal_os_support[0],
|
||||||
@@ -248,7 +248,7 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
"AMD TeraScale Common": {
|
"AMD TeraScale Common": {
|
||||||
"Display Name": None,
|
"Display Name": "",
|
||||||
"OS Support": {
|
"OS Support": {
|
||||||
"Minimum OS Support": {
|
"Minimum OS Support": {
|
||||||
"OS Major": os_data.os_data.mojave,
|
"OS Major": os_data.os_data.mojave,
|
||||||
|
|||||||
@@ -29,17 +29,11 @@ class PCIDevice:
|
|||||||
device_id: int # The device ID of this PCI device
|
device_id: int # The device ID of this PCI device
|
||||||
class_code: int # The class code of this PCI device - https://pci-ids.ucw.cz/read/PD
|
class_code: int # The class code of this PCI device - https://pci-ids.ucw.cz/read/PD
|
||||||
|
|
||||||
# ioregistryentry: Optional[ioreg.IORegistryEntry] = None
|
|
||||||
name: Optional[str] = None # Name of IORegistryEntry
|
name: Optional[str] = None # Name of IORegistryEntry
|
||||||
model: Optional[str] = None # model property
|
model: Optional[str] = None # model property
|
||||||
acpi_path: Optional[str] = None
|
acpi_path: Optional[str] = None
|
||||||
pci_path: Optional[str] = None
|
pci_path: Optional[str] = None
|
||||||
|
|
||||||
# def __getstate__(self):
|
|
||||||
# state = self.__dict__.copy()
|
|
||||||
# state.pop("ioregistryentry")
|
|
||||||
# return state
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_ioregistry(cls, entry: ioreg.io_registry_entry_t, anti_spoof=False):
|
def from_ioregistry(cls, entry: ioreg.io_registry_entry_t, anti_spoof=False):
|
||||||
properties: dict = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperties(entry, None, ioreg.kCFAllocatorDefault, ioreg.kNilOptions)[1]) # type: ignore
|
properties: dict = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperties(entry, None, ioreg.kCFAllocatorDefault, ioreg.kNilOptions)[1]) # type: ignore
|
||||||
@@ -59,13 +53,6 @@ class PCIDevice:
|
|||||||
device.populate_pci_path(entry)
|
device.populate_pci_path(entry)
|
||||||
return device
|
return device
|
||||||
|
|
||||||
# @staticmethod
|
|
||||||
# def vendor_detect_old(device):
|
|
||||||
# for i in [NVIDIA, AMD]:
|
|
||||||
# if i.detect(device):
|
|
||||||
# return i
|
|
||||||
# return None
|
|
||||||
|
|
||||||
def vendor_detect(self, *, inherits: ClassVar[Any] = None, classes: list = None):
|
def vendor_detect(self, *, inherits: ClassVar[Any] = None, classes: list = None):
|
||||||
for i in classes or itertools.chain.from_iterable([subclass.__subclasses__() for subclass in PCIDevice.__subclasses__()]):
|
for i in classes or itertools.chain.from_iterable([subclass.__subclasses__() for subclass in PCIDevice.__subclasses__()]):
|
||||||
if issubclass(i, inherits or object) and i.detect(self):
|
if issubclass(i, inherits or object) and i.detect(self):
|
||||||
@@ -543,7 +530,6 @@ class Computer:
|
|||||||
ioreg.IOObjectRelease(device)
|
ioreg.IOObjectRelease(device)
|
||||||
|
|
||||||
def wifi_probe(self):
|
def wifi_probe(self):
|
||||||
# result = subprocess.run("ioreg -r -c IOPCIDevice -a -d2".split(), stdout=subprocess.PIPE).stdout.strip()
|
|
||||||
devices = ioreg.ioiterator_to_list(
|
devices = ioreg.ioiterator_to_list(
|
||||||
ioreg.IOServiceGetMatchingServices(
|
ioreg.IOServiceGetMatchingServices(
|
||||||
ioreg.kIOMasterPortDefault,
|
ioreg.kIOMasterPortDefault,
|
||||||
@@ -629,9 +615,6 @@ class Computer:
|
|||||||
None,
|
None,
|
||||||
)[1]
|
)[1]
|
||||||
)
|
)
|
||||||
# for device in ethernet_controllers:
|
|
||||||
# self.ethernet.append(EthernetController.from_ioregistry(device))
|
|
||||||
# ioreg.IOObjectRelease(device)
|
|
||||||
|
|
||||||
for device in ethernet_controllers:
|
for device in ethernet_controllers:
|
||||||
vendor: Type[EthernetController] = PCIDevice.from_ioregistry(device).vendor_detect(inherits=EthernetController) # type: ignore
|
vendor: Type[EthernetController] = PCIDevice.from_ioregistry(device).vendor_detect(inherits=EthernetController) # type: ignore
|
||||||
@@ -698,7 +681,6 @@ class Computer:
|
|||||||
ioreg.IOObjectRelease(entry)
|
ioreg.IOObjectRelease(entry)
|
||||||
|
|
||||||
# Real model
|
# Real model
|
||||||
# TODO: We previously had logic for OC users using iMacPro1,1 with incorrect ExposeSensitiveData. Add logic?
|
|
||||||
self.real_model = utilities.get_nvram("oem-product", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True) or self.reported_model
|
self.real_model = utilities.get_nvram("oem-product", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True) or self.reported_model
|
||||||
self.real_board_id = utilities.get_nvram("oem-board", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True) or self.reported_board_id
|
self.real_board_id = utilities.get_nvram("oem-board", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True) or self.reported_board_id
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user