mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-21 03:04:31 +10:00
Add Content Caching support configurability
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
- Increment Binaries:
|
||||
- FeatureUnlock 1.0.6 - rolling (d98a31f)
|
||||
- Resolve SIP and SecureBootModel not disabling by default on some non-Metal Mac Pros
|
||||
- Add Content Caching support configurability
|
||||
|
||||
## 0.4.1
|
||||
- Add XHCI Boot Support to pre-UEFI 2.0 Macs
|
||||
|
||||
@@ -1887,6 +1887,14 @@ class wx_python_gui:
|
||||
print("Wake on WLAN Disabled")
|
||||
self.constants.enable_wake_on_wlan = False
|
||||
|
||||
def content_caching_click(self, event=None):
|
||||
if self.content_caching_checkbox.GetValue():
|
||||
print("Content Caching Enabled")
|
||||
self.constants.set_content_caching = True
|
||||
else:
|
||||
print("Content Caching Disabled")
|
||||
self.constants.set_content_caching = False
|
||||
|
||||
def disable_tb_click(self, event=None):
|
||||
if self.disable_thunderbolt_checkbox.GetValue():
|
||||
print("Disable Thunderbolt Enabled")
|
||||
@@ -2380,12 +2388,19 @@ OpenCore Legacy Patcher by default knows the most ideal
|
||||
self.wake_on_wlan_checkbox.SetPosition(wx.Point(self.xhci_boot_checkbox.GetPosition().x, self.xhci_boot_checkbox.GetPosition().y + self.xhci_boot_checkbox.GetSize().height))
|
||||
self.wake_on_wlan_checkbox.SetToolTip(wx.ToolTip("Enables Wake on WLAN for Broadcom Wifi.\nBy default, Wake on WLAN is disabled to work around Apple's wake from sleep bug causing heavily degraded networking performance.\nNote: This option is only applicable for BCM943224, BCM94331, BCM94360 and BCM943602 chipsets"))
|
||||
|
||||
# Content Caching
|
||||
self.content_caching_checkbox = wx.CheckBox(self.frame, label="Content Caching")
|
||||
self.content_caching_checkbox.SetValue(self.constants.set_content_caching)
|
||||
self.content_caching_checkbox.Bind(wx.EVT_CHECKBOX, self.content_caching_click)
|
||||
self.content_caching_checkbox.SetPosition(wx.Point(self.wake_on_wlan_checkbox.GetPosition().x, self.wake_on_wlan_checkbox.GetPosition().y + self.wake_on_wlan_checkbox.GetSize().height))
|
||||
self.content_caching_checkbox.SetToolTip(wx.ToolTip("Enables content caching support in macOS"))
|
||||
|
||||
# Button: return to main menu
|
||||
self.return_to_main_menu_button = wx.Button(self.frame, label="Return to Settings")
|
||||
self.return_to_main_menu_button.Bind(wx.EVT_BUTTON, self.settings_menu)
|
||||
self.return_to_main_menu_button.SetPosition(wx.Point(
|
||||
self.wake_on_wlan_checkbox.GetPosition().x,
|
||||
self.wake_on_wlan_checkbox.GetPosition().y + self.wake_on_wlan_checkbox.GetSize().height + 10))
|
||||
self.content_caching_checkbox.GetPosition().x,
|
||||
self.content_caching_checkbox.GetPosition().y + self.content_caching_checkbox.GetSize().height + 10))
|
||||
self.return_to_main_menu_button.Center(wx.HORIZONTAL)
|
||||
|
||||
# set frame size below return to main menu button
|
||||
|
||||
@@ -965,6 +965,26 @@ Supported Options:
|
||||
else:
|
||||
print("Invalid input, returning to previous menu")
|
||||
self.set_nvram_write()
|
||||
|
||||
def set_cc_support(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set Content Caching Support"])
|
||||
print(
|
||||
"""
|
||||
On systems spoofing via VMM, Content Caching is disabled by
|
||||
default by Apple. This option allows you to mask VMM from
|
||||
AssetCache.
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set Content Caching Support (y/n/q): ")
|
||||
if change_menu in ["y", "Y", "yes", "Yes"]:
|
||||
self.constants.set_content_caching = True
|
||||
elif change_menu in ["n", "N", "no", "No"]:
|
||||
self.constants.set_content_caching = False
|
||||
elif change_menu in ["q", "Q", "Quit", "quit"]:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.set_cc_support()
|
||||
|
||||
def credits(self):
|
||||
utilities.TUIOnlyPrint(
|
||||
@@ -1192,6 +1212,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
[f"Set 3rd Party SSD Support:\tCurrently {self.constants.allow_3rd_party_drives}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_3rd_party_drices],
|
||||
[f"Set FeatureUnlock: \tCurrently {self.constants.fu_status}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_fu_settings],
|
||||
[f"Set NVRAM Write:\t\tCurrently {self.constants.nvram_write}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_nvram_write],
|
||||
[f"Set Content Caching:\tCurrently {self.constants.set_content_caching}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_cc_support],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
|
||||
Reference in New Issue
Block a user