mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-26 14:02:53 -05:00
Added command line option --pause-on-battery and renamed config option.
This commit is contained in:
@@ -252,5 +252,5 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
|
||||
doc.AddMember(StringRef(kUserAgent), m_userAgent.toJSON(), allocator);
|
||||
doc.AddMember(StringRef(kVerbose), Log::verbose(), allocator);
|
||||
doc.AddMember(StringRef(kWatch), m_watch, allocator);
|
||||
doc.AddMember(StringRef(kMineOnBattery), m_mineOnBattery, allocator);
|
||||
doc.AddMember(StringRef(kPauseOnBattery), isPauseOnBattery(), allocator);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ R"===(
|
||||
"syslog": false,
|
||||
"user-agent": null,
|
||||
"watch": true,
|
||||
"mine-on-battery": true
|
||||
"pause-on-battery": false
|
||||
}
|
||||
)===";
|
||||
#endif
|
||||
|
||||
@@ -95,6 +95,7 @@ static const option options[] = {
|
||||
{ "data-dir", 1, nullptr, IConfig::DataDirKey },
|
||||
{ "title", 1, nullptr, IConfig::TitleKey },
|
||||
{ "no-title", 0, nullptr, IConfig::NoTitleKey },
|
||||
{ "pause-on-battery", 0, nullptr, IConfig::PauseOnBatteryKey },
|
||||
# ifdef XMRIG_FEATURE_TLS
|
||||
{ "tls", 0, nullptr, IConfig::TlsKey },
|
||||
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },
|
||||
|
||||
@@ -177,6 +177,7 @@ static inline const std::string &usage()
|
||||
u += " --title set custom console window title\n";
|
||||
u += " --no-title disable setting console window title\n";
|
||||
# endif
|
||||
u += " --pause-on-battery pause mine on battery power\n";
|
||||
|
||||
return u;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user