sys_patch_detect.py: Add support for Web Drivers on Tesla/Kepler

This commit is contained in:
Mykola Grymalyuk
2022-05-27 16:02:19 -06:00
parent 7a0e824536
commit 90e23bef92
5 changed files with 29 additions and 11 deletions

View File

@@ -172,3 +172,11 @@ class generate_defaults:
settings.force_vmm = False
except KeyError:
pass
nv_web_status = subprocess.run(["defaults", "read", "com.dortania.opencore-legacy-patcher", "Force_Web_Drivers"], stdout=subprocess.PIPE).stdout.decode("utf-8").strip()
if nv_web_status in ["1", "true"]:
settings.force_nv_web = True
else:
subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "Force_Web_Drivers", "-bool", "FALSE"])
settings.force_nv_web = False