1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-10 09:02:45 -05:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Tony Butler
b60e6ee2d9 Merge 5ac6d438fa into f9c4c57216 2024-02-25 14:55:44 -08:00
XMRig
f9c4c57216 v6.21.2-dev 2024-02-25 23:00:45 +07:00
XMRig
a5b8b85967 Merge branch 'master' into dev 2024-02-25 23:00:11 +07:00
XMRig
a5aa2c9042 v6.21.1 2024-02-25 22:26:52 +07:00
XMRig
fa35a32eee Merge branch 'dev' 2024-02-25 22:25:41 +07:00
Tony Butler
5ac6d438fa pause-on-battery: Support macsmc-battery driver and sysfs node 2023-07-12 02:06:54 -06:00
2 changed files with 8 additions and 2 deletions

View File

@@ -169,6 +169,12 @@ bool xmrig::Platform::isOnBatteryPower()
return (status == "Discharging");
}
}
std::ifstream f("/sys/class/power_supply/macsmc-battery/status");
if (f.is_open()) {
std::string status;
f >> status;
return (status == "Discharging");
}
return false;
}

View File

@@ -22,7 +22,7 @@
#define APP_ID "xmrig"
#define APP_NAME "XMRig"
#define APP_DESC "XMRig miner"
#define APP_VERSION "6.21.1-dev"
#define APP_VERSION "6.21.2-dev"
#define APP_DOMAIN "xmrig.com"
#define APP_SITE "www.xmrig.com"
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"
@@ -30,7 +30,7 @@
#define APP_VER_MAJOR 6
#define APP_VER_MINOR 21
#define APP_VER_PATCH 1
#define APP_VER_PATCH 2
#ifdef _MSC_VER
# if (_MSC_VER >= 1930)