mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-17 13:22:54 +10:00
Add support for disabling ColorSync patch
This commit is contained in:
@@ -210,6 +210,7 @@ class Constants:
|
||||
self.set_content_caching: bool = False # Set Content Caching
|
||||
self.disable_xcpm: bool = False # Disable XCPM (X86PlatformPlugin.kext)
|
||||
self.set_vmm_cpuid: bool = False # Set VMM bit inside CPUID
|
||||
self.disable_cat_colorsync: bool = False # Disable the ColorSync patch to regain Display Profiles
|
||||
self.set_alc_usage: bool = True # Set AppleALC usage
|
||||
self.allow_3rd_party_drives: bool = True # Allow ThridPartyDrives quirk
|
||||
self.allow_nvme_fixing: bool = True # Allow NVMe Kernel Space Patches
|
||||
|
||||
@@ -2853,13 +2853,25 @@ class wx_python_gui:
|
||||
self.set_terascale_accel_checkbox.Disable()
|
||||
self.set_terascale_accel_checkbox.SetValue(False)
|
||||
|
||||
# Disable ColorSync Downgrade
|
||||
self.set_colorsync_checkbox = wx.CheckBox(self.frame_modal, label="Disable ColorSync Downgrade")
|
||||
self.set_colorsync_checkbox.SetValue(self.constants.disable_cat_colorsync)
|
||||
self.set_colorsync_checkbox.Bind(wx.EVT_CHECKBOX, self.disable_colorsync_click)
|
||||
self.set_colorsync_checkbox.SetPosition(wx.Point(
|
||||
self.set_terascale_accel_checkbox.GetPosition().x,
|
||||
self.set_terascale_accel_checkbox.GetPosition().y + self.set_terascale_accel_checkbox.GetSize().height))
|
||||
self.set_colorsync_checkbox.SetToolTip(wx.ToolTip("This option will disable the ColorSync patch used on HD 3000 Macs.\nMainly applicable if you need Display Profile functionality"))
|
||||
if self.computer.real_model not in ["MacBookAir4,1","MacBookAir4,2","MacBookPro8,1","MacBookPro8,2","MacBookPro8,3","Macmini5,1"]:
|
||||
self.set_colorsync_checkbox.Disable()
|
||||
self.set_colorsync_checkbox.SetValue(False)
|
||||
|
||||
# Windows GMUX
|
||||
self.windows_gmux_checkbox = wx.CheckBox(self.frame_modal, label="Windows GMUX")
|
||||
self.windows_gmux_checkbox.SetValue(self.constants.dGPU_switch)
|
||||
self.windows_gmux_checkbox.Bind(wx.EVT_CHECKBOX, self.windows_gmux_click)
|
||||
self.windows_gmux_checkbox.SetPosition(wx.Point(
|
||||
self.set_terascale_accel_checkbox.GetPosition().x,
|
||||
self.set_terascale_accel_checkbox.GetPosition().y + self.set_terascale_accel_checkbox.GetSize().height))
|
||||
self.set_colorsync_checkbox.GetPosition().x,
|
||||
self.set_colorsync_checkbox.GetPosition().y + self.set_colorsync_checkbox.GetSize().height))
|
||||
self.windows_gmux_checkbox.SetToolTip(wx.ToolTip("Enable this option to allow usage of the hardware GMUX to switch between Intel and Nvidia/AMD GPUs in Windows."))
|
||||
|
||||
# Hibernation Workaround
|
||||
@@ -3142,6 +3154,14 @@ class wx_python_gui:
|
||||
global_settings.GlobalEnviromentSettings().write_property("MacBookPro_TeraScale_2_Accel", False)
|
||||
self.constants.allow_ts2_accel = False
|
||||
|
||||
def disable_colorsync_click(self, event=None):
|
||||
if self.set_colorsync_checkbox.GetValue():
|
||||
logging.info("ColorSync Patch Enabled")
|
||||
self.constants.disable_cat_colorsync = True
|
||||
else:
|
||||
logging.info("ColorSync Patch Disabled")
|
||||
self.constants.disable_cat_colorsync = False
|
||||
|
||||
def force_web_drivers_click(self, event=None):
|
||||
if self.force_web_drivers_checkbox.GetValue():
|
||||
logging.info("Force Web Drivers Enabled")
|
||||
|
||||
@@ -52,8 +52,9 @@ class GenerateRootPatchSets:
|
||||
required_patches.update({"High Sierra GVA": all_hardware_patchset["Graphics"]["High Sierra GVA"]})
|
||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||
required_patches.update({"Intel Sandy Bridge": all_hardware_patchset["Graphics"]["Intel Sandy Bridge"]})
|
||||
# Patchset breaks Display Profiles, don't install if primary GPU is AMD
|
||||
|
||||
# Patchset breaks Display Profiles, don't install if primary GPU is AMD. Give users option to disable patch in settings to restore Display Profiles
|
||||
if self.constants.computer.real_model not in ["Macmini5,2", "iMac12,1", "iMac12,2"] or self.constants.disable_cat_colorsync is False:
|
||||
required_patches.update({"Non-Metal ColorSync Workaround": all_hardware_patchset["Graphics"]["Non-Metal ColorSync Workaround"]})
|
||||
|
||||
if self.hardware_details["Graphics: Intel Ivy Bridge"] is True:
|
||||
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
|
||||
|
||||
Reference in New Issue
Block a user