mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-01-27 18:19:49 +00:00
Add spoof ID for supported GPU missing in macOS
This commit is contained in:
@@ -2,6 +2,7 @@ from Scripts.datasets import chipset_data
|
||||
from Scripts.datasets import cpu_data
|
||||
from Scripts.datasets import mac_model_data
|
||||
from Scripts.datasets import os_data
|
||||
from Scripts.datasets import pci_data
|
||||
from Scripts import codec_layouts
|
||||
from Scripts import gathering_files
|
||||
from Scripts import smbios
|
||||
@@ -264,6 +265,14 @@ class ConfigProdigy:
|
||||
elif gpu_info.get("Device Type") == "Discrete GPU":
|
||||
discrete_gpu = gpu_info
|
||||
|
||||
if not discrete_gpu.get("PCI Path") or not discrete_gpu.get("Device ID") in pci_data.SpoofGPUIDs:
|
||||
pass
|
||||
|
||||
deviceproperties_add[discrete_gpu.get("PCI Path")] = {
|
||||
"device-id": self.utils.to_little_endian_hex(pci_data.SpoofGPUIDs.get(discrete_gpu.get("Device ID")).split("-")[-1]),
|
||||
"model": gpu_name
|
||||
}
|
||||
|
||||
for key, value in deviceproperties_add.items():
|
||||
for key_child, value_child in value.items():
|
||||
if isinstance(value_child, str):
|
||||
@@ -406,6 +415,9 @@ class ConfigProdigy:
|
||||
if "Beta" in os_data.get_macos_name_by_darwin(macos_version):
|
||||
boot_args.append("-lilubetaall")
|
||||
|
||||
if list(hardware_report.get("GPU").items())[0][-1].get("Device ID") in pci_data.SpoofGPUIDs:
|
||||
boot_args.append("-radcodec")
|
||||
|
||||
if list(hardware_report.get("GPU").items())[-1][-1].get("Device ID") in ("1002-6610", "1002-682B", "1002-6837", "1002-683D", "1002-683F"):
|
||||
boot_args.append("radpg=15")
|
||||
|
||||
|
||||
@@ -95,6 +95,13 @@ class Utils:
|
||||
def int_to_hex(self, number):
|
||||
return format(number, '02X')
|
||||
|
||||
def to_little_endian_hex(self, hex_string):
|
||||
hex_string = hex_string.lower().lstrip("0x")
|
||||
|
||||
little_endian_hex = ''.join(reversed([hex_string[i:i+2] for i in range(0, len(hex_string), 2)]))
|
||||
|
||||
return little_endian_hex.upper()
|
||||
|
||||
def string_to_hex(self, string):
|
||||
return ''.join(format(ord(char), '02X') for char in string)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user