diff --git a/Install/Install.vdproj b/Install/Install.vdproj index a8979ac..b1125c0 100644 --- a/Install/Install.vdproj +++ b/Install/Install.vdproj @@ -21,12 +21,6 @@ } "Entry" { - "MsmKey" = "8:_055E075BF224A12F432351DF93952E0E" - "OwnerKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_09B1992F95E748E1845109AD2B634C5A" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -39,12 +33,6 @@ } "Entry" { - "MsmKey" = "8:_1375B50A6DC9C5B6B588529FB724B677" - "OwnerKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -69,42 +57,12 @@ } "Entry" { - "MsmKey" = "8:_4F8B5EE2B052FEA2FFA646E5A39AF737" - "OwnerKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_557F8C025C2F12A22DEB61B7BD602D9A" - "OwnerKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_62778E3B93EA66E8423CFE35D880654B" - "OwnerKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_6351900FB5424C86AB017CEAB765135D" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_82E4C2532EEB39831247EDB4B6D917DC" - "OwnerKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_83763AF12CFE41FE16B491DE99592F8F" - "OwnerKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_9503587A884F4044BECE7881E4187E1C" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -147,28 +105,10 @@ } "Entry" { - "MsmKey" = "8:_E57C9B0CB5862DCB6BAC31D289B34509" - "OwnerKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_E62E3EC8F5681811CD45B0147079B24F" - "OwnerKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_FA7989C51ECD437AB3316446FB849F60" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } - "Entry" - { - "MsmKey" = "8:_FE510A127E1B3283F303BA235B3D1001" - "OwnerKey" = "8:_1924518F6EA84AD696BCCE8E589E25C7" - "MsmSig" = "8:_UNDEFINED" - } } "Configurations" { @@ -271,26 +211,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_055E075BF224A12F432351DF93952E0E" - { - "SourcePath" = "8:POWRPROF.dll" - "TargetName" = "8:POWRPROF.dll" - "Tag" = "8:" - "Folder" = "8:_77CCC7F3944A4B009D9231F8B41DFD6D" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_09B1992F95E748E1845109AD2B634C5A" { "SourcePath" = "8:..\\Doc\\alienfan-gui.md" @@ -331,26 +251,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1375B50A6DC9C5B6B588529FB724B677" - { - "SourcePath" = "8:d3d11.dll" - "TargetName" = "8:d3d11.dll" - "Tag" = "8:" - "Folder" = "8:_77CCC7F3944A4B009D9231F8B41DFD6D" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_3AE7CAAC94814B3090DEAE0C5F50265B" { "SourcePath" = "8:..\\Doc\\alienfan-cli.md" @@ -391,66 +291,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_4F8B5EE2B052FEA2FFA646E5A39AF737" - { - "SourcePath" = "8:pdh.dll" - "TargetName" = "8:pdh.dll" - "Tag" = "8:" - "Folder" = "8:_77CCC7F3944A4B009D9231F8B41DFD6D" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_557F8C025C2F12A22DEB61B7BD602D9A" - { - "SourcePath" = "8:MSIMG32.dll" - "TargetName" = "8:MSIMG32.dll" - "Tag" = "8:" - "Folder" = "8:_77CCC7F3944A4B009D9231F8B41DFD6D" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_62778E3B93EA66E8423CFE35D880654B" - { - "SourcePath" = "8:SETUPAPI.dll" - "TargetName" = "8:SETUPAPI.dll" - "Tag" = "8:" - "Folder" = "8:_39E2774D52CE4B619039352379796769" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6351900FB5424C86AB017CEAB765135D" { "SourcePath" = "8:..\\Doc\\LightFX.md" @@ -471,46 +311,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_82E4C2532EEB39831247EDB4B6D917DC" - { - "SourcePath" = "8:HID.DLL" - "TargetName" = "8:HID.DLL" - "Tag" = "8:" - "Folder" = "8:_39E2774D52CE4B619039352379796769" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_83763AF12CFE41FE16B491DE99592F8F" - { - "SourcePath" = "8:VERSION.dll" - "TargetName" = "8:VERSION.dll" - "Tag" = "8:" - "Folder" = "8:_77CCC7F3944A4B009D9231F8B41DFD6D" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9503587A884F4044BECE7881E4187E1C" { "SourcePath" = "8:..\\alienfx-config.cmd" @@ -591,66 +391,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E57C9B0CB5862DCB6BAC31D289B34509" - { - "SourcePath" = "8:WININET.dll" - "TargetName" = "8:WININET.dll" - "Tag" = "8:" - "Folder" = "8:_77CCC7F3944A4B009D9231F8B41DFD6D" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E62E3EC8F5681811CD45B0147079B24F" - { - "SourcePath" = "8:COMDLG32.dll" - "TargetName" = "8:COMDLG32.dll" - "Tag" = "8:" - "Folder" = "8:_77CCC7F3944A4B009D9231F8B41DFD6D" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_FE510A127E1B3283F303BA235B3D1001" - { - "SourcePath" = "8:dxgi.dll" - "TargetName" = "8:dxgi.dll" - "Tag" = "8:" - "Folder" = "8:_77CCC7F3944A4B009D9231F8B41DFD6D" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } } "FileType" { @@ -817,15 +557,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:AlienFX Tools" - "ProductCode" = "8:{F642A59D-3D05-4408-BE66-6AFDD3582D05}" - "PackageCode" = "8:{4F2AD2FA-EF13-4F30-93BC-C012D1540EB5}" + "ProductCode" = "8:{58CBD1BB-FE67-4CF8-915C-523F829BE48D}" + "PackageCode" = "8:{4A0672E7-9901-4310-9103-4D06B94337E1}" "UpgradeCode" = "8:{EFC2D182-AE5E-4585-92D3-0759F77F59AA}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:FALSE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:8.6.102" + "ProductVersion" = "8:8.6.103" "Manufacturer" = "8:T-Troll" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:https://github.com/T-Troll/alienfx-tools/discussions" diff --git a/LightFX/LightFX.rc b/LightFX/LightFX.rc index 708474b..fae7a96 100644 --- a/LightFX/LightFX.rc +++ b/LightFX/LightFX.rc @@ -62,7 +62,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US VS_VERSION_INFO VERSIONINFO FILEVERSION 8,6,1,1 - PRODUCTVERSION 8,6,1,2 + PRODUCTVERSION 8,6,1,3 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -83,7 +83,7 @@ BEGIN VALUE "LegalCopyright", "Copyright (C) 2021" VALUE "OriginalFilename", "LightFX.dll" VALUE "ProductName", "AlienFX Tools" - VALUE "ProductVersion", "8.6.1.2" + VALUE "ProductVersion", "8.6.1.3" END END BLOCK "VarFileInfo" diff --git a/alienfan-tools/alienfan-SDK/alienfan-SDK.cpp b/alienfan-tools/alienfan-SDK/alienfan-SDK.cpp index a1eae7b..eeff7c8 100644 --- a/alienfan-tools/alienfan-SDK/alienfan-SDK.cpp +++ b/alienfan-tools/alienfan-SDK/alienfan-SDK.cpp @@ -420,18 +420,15 @@ namespace AlienFan_SDK { //} //return -1; } - int Control::GetPower() { - //if (devs[aDev].commandControlled) { + int Control::GetPower(bool raw) { if (devs[aDev].delta) return lastMode; int pl = RunMainCommand(dev_controls.getPower); + if (raw || pl < 0) + return pl; for (int i = 0; pl >= 0 && i < powers.size(); i++) if (powers[i] == pl) return i; - //} else { - // // Always return Auto mode for system safety! - // return 1; - //} return -1; } int Control::SetGPU(int power) { diff --git a/alienfan-tools/alienfan-SDK/alienfan-SDK.h b/alienfan-tools/alienfan-SDK/alienfan-SDK.h index 691ee9f..5aec79c 100644 --- a/alienfan-tools/alienfan-SDK/alienfan-SDK.h +++ b/alienfan-tools/alienfan-SDK/alienfan-SDK.h @@ -121,7 +121,7 @@ namespace AlienFan_SDK { // Get current system power value index at powers[] // Result: power value index in powers[] - int GetPower(); + int GetPower(bool raw = false); // Set system GPU limit level (0 - no limit, 3 - min. limit) // Result: success or error diff --git a/alienfan-tools/alienfan-SDK_v2/alienfan-SDK.cpp b/alienfan-tools/alienfan-SDK_v2/alienfan-SDK.cpp index f7af84f..329a8d9 100644 --- a/alienfan-tools/alienfan-SDK_v2/alienfan-SDK.cpp +++ b/alienfan-tools/alienfan-SDK_v2/alienfan-SDK.cpp @@ -256,9 +256,10 @@ namespace AlienFan_SDK { int Control::SetPower(byte level) { return CallWMIMethod(setPowerMode, level); } - int Control::GetPower() { + int Control::GetPower(bool raw) { int pl = CallWMIMethod(getPowerMode); - for (int i = 0; /*pl >= 0 &&*/ i < powers.size(); i++) + if (raw || pl < 0) return pl; + for (int i = 0; i < powers.size(); i++) if (powers[i] == pl) return i; return -1; @@ -275,7 +276,7 @@ namespace AlienFan_SDK { } int Control::GetGMode() { - return isGmode ? GetPower() < 0 || CallWMIMethod(getGMode) : 0; + return isGmode ? GetPower(true) < 0 || CallWMIMethod(getGMode) : 0; } Lights::Lights(Control *ac) { diff --git a/alienfan-tools/alienfan-SDK_v2/alienfan-SDK.h b/alienfan-tools/alienfan-SDK_v2/alienfan-SDK.h index a5ab016..369d292 100644 --- a/alienfan-tools/alienfan-SDK_v2/alienfan-SDK.h +++ b/alienfan-tools/alienfan-SDK_v2/alienfan-SDK.h @@ -105,9 +105,9 @@ namespace AlienFan_SDK { // Result: raw value set or error int SetPower(byte level); - // Get current system power value index at powers[] - // Result: power value index in powers[] or error - int GetPower(); + // Get current system power value. + // Result: power value (raw true) or index in powers[] (raw false) or error + int GetPower(bool raw = false); // Set system GPU limit level (0 - no limit, 3 - min. limit) // Result: success or error diff --git a/alienfan-tools/alienfan-cli/alienfan-cli.cpp b/alienfan-tools/alienfan-cli/alienfan-cli.cpp index 9f9b06c..14969b0 100644 --- a/alienfan-tools/alienfan-cli/alienfan-cli.cpp +++ b/alienfan-tools/alienfan-cli/alienfan-cli.cpp @@ -100,6 +100,7 @@ void CheckFanOverboost(byte num, byte boost) { printf("Final boost - %d, %d RPM\n\n", bestBoostPoint.maxBoost, bestBoostPoint.maxRPM); acpi.SetFanBoost(num, oldBoost); fan_conf.UpdateBoost(num, bestBoostPoint.maxBoost, bestBoostPoint.maxRPM); + fan_conf.Save(); } void PrintFanType(int index, int val, const char* type) { @@ -139,7 +140,7 @@ setbrightness=\tSet lights brightness\n\ int main(int argc, char* argv[]) { - printf("AlienFan-CLI v8.5.1\n"); + printf("AlienFan-CLI v8.6.1.3\n"); #ifndef NOLIGHTS AlienFan_SDK::Lights* lights = NULL; #endif @@ -210,7 +211,7 @@ int main(int argc, char* argv[]) continue; } if (command == "setpower" && CheckArgs(1, acpi.powers.size()) && acpi.SetPower(acpi.powers[args[0].num]) >= 0) { - printf("Power mode set to %s (%d)\n", fan_conf.GetPowerName(args[0].num)->c_str(), acpi.powers[args[0].num]); + printf("Power mode set to %s (%x)\n", fan_conf.GetPowerName(acpi.powers[args[0].num])->c_str(), acpi.powers[args[0].num]); continue; } if (command == "setperf" && CheckArgs(2, 5)) { @@ -225,9 +226,9 @@ int main(int argc, char* argv[]) continue; } if (command == "getpower") { - int res = acpi.GetPower(); + int res = acpi.GetPower(true); if (res >= 0) - printf("Power mode: %s (%d)\n", fan_conf.GetPowerName(res)->c_str(), acpi.powers[res]); + printf("Power mode: %s (%x)\n", fan_conf.GetPowerName(res)->c_str(), res); continue; } if (command == "getfans") { diff --git a/alienfan-tools/alienfan-gui/alienfan-gui.rc b/alienfan-tools/alienfan-gui/alienfan-gui.rc index 318db51..525cd22 100644 Binary files a/alienfan-tools/alienfan-gui/alienfan-gui.rc and b/alienfan-tools/alienfan-gui/alienfan-gui.rc differ diff --git a/alienfan-tools/alienfan-mon/MonHelper.cpp b/alienfan-tools/alienfan-mon/MonHelper.cpp index 4e160a5..7833fe1 100644 --- a/alienfan-tools/alienfan-mon/MonHelper.cpp +++ b/alienfan-tools/alienfan-mon/MonHelper.cpp @@ -68,20 +68,20 @@ void MonHelper::Stop() { void MonHelper::SetCurrentMode(int newMode) { if (newMode < 0) newMode = fan_conf->lastProf->gmodeStage ? powerSize : fan_conf->lastProf->powerStage; - int cmode = GetPowerMode(); - if (newMode != cmode) { + //int cmode = GetPowerMode(); + if (newMode != powerMode) { if (newMode < powerSize) { - if (cmode == powerSize) { + if (powerMode == powerSize) { acpi->SetGMode(0); } acpi->SetPower(acpi->powers[newMode]); ResetBoost(); - DebugPrint("Mon: Power mode switch from " + to_string(cmode) + " to " + to_string(newMode) + "\n"); + DebugPrint("Mon: Power mode switch from " + (powerMode == powerSize ? "G-mode" : to_string(powerMode)) + " to " + to_string(newMode) + "\n"); } else { acpi->SetPower(0xa0); acpi->SetGMode(1); - DebugPrint("Mon: Power mode switch from " + to_string(cmode) + " to G-mode\n"); + DebugPrint("Mon: Power mode switch from " + to_string(powerMode) + " to G-mode\n"); } powerMode = newMode; } @@ -96,8 +96,16 @@ byte MonHelper::GetFanPercent(byte fanID) } int MonHelper::GetPowerMode() { - int cmode = acpi->GetPower(); - return acpi->GetGMode() ? (systemID != 4800 || cmode == (powerSize - 1) || cmode < 0) ? powerSize : cmode : cmode; + if (acpi->GetGMode()) { + if (systemID != 4800) { // buggy G25 BIOS fix + return powerSize; + } else { + int cmode = acpi->GetPower(true); + if (cmode == 0xab || cmode < 0) + return powerSize; + } + } + return acpi->GetPower(); } void MonHelper::SetPowerMode(WORD newMode) { @@ -137,6 +145,7 @@ void CMonProc(LPVOID param) { if (src->inControl && active) { // check power mode + src->powerMode = src->GetPowerMode(); src->SetCurrentMode(); if (!src->powerMode && modified) { diff --git a/alienfx-gui/alienfx-gui.rc b/alienfx-gui/alienfx-gui.rc index a7569a0..8b8bb16 100644 Binary files a/alienfx-gui/alienfx-gui.rc and b/alienfx-gui/alienfx-gui.rc differ diff --git a/alienfx-mon/alienfx-mon.rc b/alienfx-mon/alienfx-mon.rc index 442a037..d614479 100644 Binary files a/alienfx-mon/alienfx-mon.rc and b/alienfx-mon/alienfx-mon.rc differ