From 590201030e191bebf654efc2680c0fe4475cc6b4 Mon Sep 17 00:00:00 2001 From: Hoang Hong Quan Date: Sun, 3 Nov 2024 01:03:23 +0700 Subject: [PATCH] Fix display of compatible macOS version related to GPU --- Scripts/compatibility_checker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Scripts/compatibility_checker.py b/Scripts/compatibility_checker.py index ba0a2f8..0954521 100644 --- a/Scripts/compatibility_checker.py +++ b/Scripts/compatibility_checker.py @@ -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!")