mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-23 19:40:15 +10:00
sys_patch_detect: Revise AMFI logic
Currently the AMFI level requirement will be determined by the GPU needed. - Intel iGPUs: Only Library Validation patch (`_cs_require_lv`) - Nvidia Kepler and GCN: Full AMFI needs to be disabled (`amfi=0x80`) If you have a mixed GPU system, the highest patch requirement will be chosen (ie. `amfi=0x80` on iMac15,1)
This commit is contained in:
@@ -95,13 +95,16 @@ class amfi_configuration_detection:
|
||||
# Levels:
|
||||
# - 1. Library Validation (Monterey and Older)
|
||||
# - 2. Library Validation and Signature Checks (Ventura and Newer)
|
||||
# - 3. Disable all AMFI checks
|
||||
|
||||
if level > 2 or level < 1:
|
||||
raise ValueError("Invalid AMFI Configuration Level")
|
||||
if level == 0:
|
||||
return True
|
||||
|
||||
if level == 1:
|
||||
return self.SKIP_LIBRARY_VALIDATION
|
||||
if level == 2:
|
||||
return bool(self.SKIP_LIBRARY_VALIDATION and self.AMFI_ALLOW_INVALID_SIGNATURE)
|
||||
if level == 3:
|
||||
return self.AMFI_ALLOW_EVERYTHING
|
||||
|
||||
return False
|
||||
Reference in New Issue
Block a user