mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-18 13:20:00 +10:00
build: Add AMD GOP injection
This commit is contained in:
+21
-2
@@ -2480,13 +2480,24 @@ class wx_python_gui:
|
||||
self.timeout_spinner.Bind(wx.EVT_SPINCTRL, self.timeout_spinner_click)
|
||||
self.timeout_spinner.Centre(wx.HORIZONTAL)
|
||||
|
||||
# AMD GOP Injection
|
||||
self.set_gop_injection = wx.CheckBox(self.frame_modal, label="AMD GOP Injection")
|
||||
self.set_gop_injection.SetPosition(wx.Point(
|
||||
30,
|
||||
self.timeout_spinner.GetPosition().y + self.timeout_spinner.GetSize().height + 5))
|
||||
self.set_gop_injection.SetValue(self.constants.gop_injection)
|
||||
self.set_gop_injection.Bind(wx.EVT_CHECKBOX, self.gop_injection_checkbox_click)
|
||||
models = ["iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2", "MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1"]
|
||||
if (not self.constants.custom_model and self.computer.real_model not in models) or (self.constants.custom_model and self.constants.custom_model not in models):
|
||||
self.set_gop_injection.Disable()
|
||||
|
||||
# Disable Thunderbolt
|
||||
self.disable_thunderbolt_checkbox = wx.CheckBox(self.frame_modal, label="Disable Thunderbolt")
|
||||
self.disable_thunderbolt_checkbox.SetValue(self.constants.disable_tb)
|
||||
self.disable_thunderbolt_checkbox.Bind(wx.EVT_CHECKBOX, self.disable_tb_click)
|
||||
self.disable_thunderbolt_checkbox.SetPosition(wx.Point(
|
||||
30,
|
||||
self.timeout_spinner.GetPosition().y + self.timeout_spinner.GetSize().height + 5))
|
||||
self.set_gop_injection.GetPosition().x,
|
||||
self.set_gop_injection.GetPosition().y + self.set_gop_injection.GetSize().height))
|
||||
self.disable_thunderbolt_checkbox.SetToolTip(wx.ToolTip("Disables Thunderbolt support on MacBookPro11,x\nMainly applicable for systems that cannot boot with Thunderbolt enabled"))
|
||||
if not self.constants.custom_model and not self.computer.real_model.startswith("MacBookPro11"):
|
||||
self.disable_thunderbolt_checkbox.Disable()
|
||||
@@ -2745,6 +2756,14 @@ class wx_python_gui:
|
||||
print("Content Caching Disabled")
|
||||
self.constants.set_content_caching = False
|
||||
|
||||
def gop_injection_checkbox_click(self, event=None):
|
||||
if self.set_gop_injection.GetValue():
|
||||
print("GOP Injection Enabled")
|
||||
self.constants.gop_injection = True
|
||||
else:
|
||||
print("GOP Injection Disabled")
|
||||
self.constants.gop_injection = False
|
||||
|
||||
def disable_tb_click(self, event=None):
|
||||
if self.disable_thunderbolt_checkbox.GetValue():
|
||||
print("Disable Thunderbolt Enabled")
|
||||
|
||||
Reference in New Issue
Block a user