Fix display of compatible macOS version related to GPU

This commit is contained in:
Hoang Hong Quan
2024-11-03 01:03:23 +07:00
parent 6a112fa4aa
commit 590201030e

View File

@@ -157,7 +157,6 @@ class CompatibilityChecker:
gpu_props["Compatibility"] = (max_version, min_version)
if max_version != ocl_patched_max_version:
gpu_props["OCLP Compatibility"] = (ocl_patched_max_version, ocl_patched_min_version if self.utils.parse_darwin_version(ocl_patched_min_version) > self.utils.parse_darwin_version("{}.{}.{}".format(int(max_version[:2]) + 1, 0, 0)) else "{}.{}.{}".format(int(max_version[:2]) + 1, 0, 0))
self.ocl_patched_macos_version = (ocl_patched_max_version, self.ocl_patched_macos_version[-1] if self.ocl_patched_macos_version and self.utils.parse_darwin_version(self.ocl_patched_macos_version[-1]) < self.utils.parse_darwin_version(gpu_props.get("OCLP Compatibility")[-1]) else gpu_props.get("OCLP Compatibility")[-1])
print("{}- {}: {}{}".format(
" "*3,
@@ -343,6 +342,9 @@ class CompatibilityChecker:
max_version, min_version = gpu_props.get("Compatibility")
max_supported_gpu_version = max_version if not max_supported_gpu_version else max_version if self.utils.parse_darwin_version(max_version) > self.utils.parse_darwin_version(max_supported_gpu_version) else max_supported_gpu_version
min_supported_gpu_version = min_version if not min_supported_gpu_version else min_version if self.utils.parse_darwin_version(min_version) < self.utils.parse_darwin_version(min_supported_gpu_version) else min_supported_gpu_version
if gpu_props.get("OCLP Compatibility"):
self.ocl_patched_macos_version = (gpu_props.get("OCLP Compatibility")[0], self.ocl_patched_macos_version[-1] if self.ocl_patched_macos_version and self.utils.parse_darwin_version(self.ocl_patched_macos_version[-1]) < self.utils.parse_darwin_version(gpu_props.get("OCLP Compatibility")[-1]) else gpu_props.get("OCLP Compatibility")[-1])
if max_supported_gpu_version == min_supported_gpu_version and max_supported_gpu_version == None:
self.utils.request_input("\n\nNo compatible GPU card for macOS was found!")