From b85854e745d02769bda288a0159e666861d69440 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Tue, 4 Jun 2019 23:40:17 +0300 Subject: [PATCH] Fixed SMCBatteryManager compatibility with 10.15 --- Changelog.md | 1 + Sensors/SMCBatteryManager/SMCSMBusController.cpp | 3 +++ VirtualSMC.xcodeproj/project.pbxproj | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index f098dd9..d9f1e13 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,7 @@ VirtualSMC Changelog ==================== #### v1.0.5 - Allow loading on 10.15 without `-lilubetaall` +- Fixed SMCBatteryManager compatibility with 10.15 #### v1.0.4 - Removed exposed REV, RBr, RPlt keys from I/O Registry diff --git a/Sensors/SMCBatteryManager/SMCSMBusController.cpp b/Sensors/SMCBatteryManager/SMCSMBusController.cpp index 59205c8..12d79a5 100644 --- a/Sensors/SMCBatteryManager/SMCSMBusController.cpp +++ b/Sensors/SMCBatteryManager/SMCSMBusController.cpp @@ -32,6 +32,9 @@ IOService *SMCSMBusController::probe(IOService *provider, SInt32 *score) { if (!BatteryManager::getShared()->probe()) return nullptr; + // On macOS 10.15 probe score is 0. + *score = 100000000; + return this; } diff --git a/VirtualSMC.xcodeproj/project.pbxproj b/VirtualSMC.xcodeproj/project.pbxproj index 7341ba2..e336b14 100644 --- a/VirtualSMC.xcodeproj/project.pbxproj +++ b/VirtualSMC.xcodeproj/project.pbxproj @@ -1028,7 +1028,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1010; - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1100; ORGANIZATIONNAME = vit9696; TargetAttributes = { 1C748C261C21952C0024EED2 = {