From d303138d2381537f9a7402237982e51ac0f1e7ed Mon Sep 17 00:00:00 2001 From: Alexander Chernoskutov Date: Thu, 17 Oct 2024 20:52:04 +0400 Subject: [PATCH] Fix getHardwareName() for GPU --- installer-inno-config.iss | 2 +- src/Backend/AWCCThermal.py | 2 +- src/GUI/AppGUI.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/installer-inno-config.iss b/installer-inno-config.iss index 5547212..94eeb7b 100644 --- a/installer-inno-config.iss +++ b/installer-inno-config.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Thermal Control Center" -#define MyAppVersion "1.6.1" +#define MyAppVersion "1.6.2" #define MyAppPublisher "AlexIII" #define MyAppURL "https://github.com/AlexIII/tcc-g15" #define MyAppExeName "tcc-g15.exe" diff --git a/src/Backend/AWCCThermal.py b/src/Backend/AWCCThermal.py index 2796143..3aab435 100644 --- a/src/Backend/AWCCThermal.py +++ b/src/Backend/AWCCThermal.py @@ -74,7 +74,7 @@ def getHardwareName(self, fanIdx: int) -> Optional[str]: return wmiInst.Name if hasattr(wmiInst, 'Name') else None elif fanIdx == 1: wmiClass = self._wmi.Win32_VideoController - wmiInst = wmiClass()[0] + wmiInst = max(wmiClass(), key=lambda inst: inst.AdapterRAM & 0xFFFFFFFF if hasattr(inst, 'AdapterRAM') and isinstance(inst.AdapterRAM, int) else 0) # Assume the one with the largest memory is the main GPU return wmiInst.Name if hasattr(wmiInst, 'Name') else None else: return None \ No newline at end of file diff --git a/src/GUI/AppGUI.py b/src/GUI/AppGUI.py index 728dc93..9e80b49 100644 --- a/src/GUI/AppGUI.py +++ b/src/GUI/AppGUI.py @@ -99,7 +99,7 @@ class TCC_GUI(QtWidgets.QWidget): FAILSAFE_TRIGGER_DELAY_SEC = 8 FAILSAFE_RESET_AFTER_TEMP_IS_OK_FOR_SEC = 60 APP_NAME = "Thermal Control Center for Dell G15" - APP_VERSION = "1.6.1" + APP_VERSION = "1.6.2" APP_DESCRIPTION = "This app is an open-source replacement for Alienware Control Center " APP_URL = "github.com/AlexIII/tcc-g15"