From 6f8b0f5d37c891927c9f7e13a0be0f2435fcdba5 Mon Sep 17 00:00:00 2001 From: "Dj X.O" <41582063+xodj@users.noreply.github.com> Date: Wed, 16 Jun 2021 14:26:06 +0300 Subject: [PATCH] 0.4.1.687 - Hot Fix - fixed bug with visibility of unsupported variables --- CMakeLists.txt | 2 +- CtrlGui.cpp | 8 +- CtrlSettings.h | 456 ++++++++++++++++++++++--------------------------- 3 files changed, 212 insertions(+), 254 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cced1b..76dd4c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16.0) #Project name and version -PROJECT(RyzenAdjCtrl VERSION 0.4.1.685 LANGUAGES CXX) +PROJECT(RyzenAdjCtrl VERSION 0.4.1.687 LANGUAGES CXX) #Set version number in this ^^^^^^^^^ #BUILD_STANDALONE on UNIX or choose on Windows if(WIN32) diff --git a/CtrlGui.cpp b/CtrlGui.cpp index 83b48ad..296d266 100644 --- a/CtrlGui.cpp +++ b/CtrlGui.cpp @@ -979,7 +979,9 @@ void CtrlGui::saveSettings(){ //Hide not supported variables Ui::CtrlGuiAPUForm *presetForm = nullptr; - hideShow *var = conf->hideShowWarnPresetVariable(settings->apuFamilyIdx); + hideShow *var = conf->hideShowWarnPresetVariable( + settings->hideNotSupportedVariables + ? settings->apuFamilyIdx : -1); for(qsizetype i = 0;i < presetFormList->count();i++){ presetForm = presetFormList->at(i); @@ -1087,7 +1089,9 @@ void CtrlGui::readSettings(){ //Hide not supported variables Ui::CtrlGuiAPUForm *presetForm = nullptr; - hideShow *var = conf->hideShowWarnPresetVariable(settings->apuFamilyIdx); + hideShow *var = conf->hideShowWarnPresetVariable( + settings->hideNotSupportedVariables + ? settings->apuFamilyIdx : -1); for(qsizetype i = 0;i < presetFormList->count();i++){ presetForm = presetFormList->at(i); diff --git a/CtrlSettings.h b/CtrlSettings.h index 999030a..ae06336 100644 --- a/CtrlSettings.h +++ b/CtrlSettings.h @@ -5,20 +5,11 @@ #include #include "CtrlConfig.h" -enum enumFanPresetId { - None = 0, - Windows, - Silent, - Perfomance, - Turbo, - Manual -}; - struct presetStr { int presetId = 0; QString presetName = "Preset Name"; - int fanPresetId = None; + int fanPresetId = 0; int tempLimitValue = 85; bool tempLimitChecked = false; @@ -120,35 +111,35 @@ struct settingsStr { }; struct hideShow { - int shwStapmLimit; - int shwFastLimit; - int shwSlowLimit; - int shwSlowTime; - int shwStapmTime; - int shwTctlTemp; - int shwVrmCurrent; - int shwVrmSocCurrent; - int shwVrmMaxCurrent; - int shwVrmSocMaxCurrent; - int shwPsi0Current; - int shwPsi0SocCurrent; - int shwMaxSocclkFrequency; - int shwMinSocclkFrequency; - int shwMaxFclkFrequency; - int shwMinFclkFrequency; - int shwMaxVcn; - int shwMinVcn; - int shwMaxLclk; - int shwMinLclk; - int shwMaxGfxclk; - int shwMinGfxclk; - int shwProchotDeassertionRamp; - int shwApuSkinTemp; - int shwDgpuSkinTemp; - int shwApuSlowLimit; - int shwSkinTempLimit; - int shwPowerSaving; - int shwMaxPerformance; + bool shwStapmLimit = true; + bool shwFastLimit = true; + bool shwSlowLimit = true; + bool shwSlowTime = true; + bool shwStapmTime = true; + bool shwTctlTemp = true; + bool shwVrmCurrent = true; + bool shwVrmSocCurrent = true; + bool shwVrmMaxCurrent = true; + bool shwVrmSocMaxCurrent = true; + bool shwPsi0Current = true; + bool shwPsi0SocCurrent = true; + bool shwMaxSocclkFrequency = true; + bool shwMinSocclkFrequency = true; + bool shwMaxFclkFrequency = true; + bool shwMinFclkFrequency = true; + bool shwMaxVcn = true; + bool shwMinVcn = true; + bool shwMaxLclk = true; + bool shwMinLclk = true; + bool shwMaxGfxclk = true; + bool shwMinGfxclk = true; + bool shwProchotDeassertionRamp = true; + bool shwApuSkinTemp = true; + bool shwDgpuSkinTemp = true; + bool shwApuSlowLimit = true; + bool shwSkinTempLimit = true; + bool shwPowerSaving = true; + bool shwMaxPerformance = true; }; class CtrlSettings : public QObject @@ -187,9 +178,8 @@ class CtrlSettings : public QObject case 5: return &shwpvLucienne; default: - return &shwpvShowAll; + return new hideShow; } - return &shwpvShowAll; } private: @@ -200,228 +190,192 @@ class CtrlSettings : public QObject QFile *presetsQFile; hideShow shwpvRaven = { - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 1, - 0, - 0, - 0, - 0, - 1, - 1 + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + true, + true }; - hideShow shwpvPicasso = { - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 1, - 1 + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + true, + true }; - hideShow shwpvRenoir = { - 2, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 2, - 2, - 2, - 2, - 1, - 1 + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true }; - hideShow shwpvCezanne = { - 2, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 2, - 2, - 2, - 2, - 1, - 1 + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true }; - hideShow shwpvDali = { - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 1, - 1 + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + true, + true }; - hideShow shwpvLucienne = { - 2, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1 + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true }; - hideShow shwpvShowAll = { - 2, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - }; }; #endif // CTRLSETTINGS_H