#1708 Added "title" option.

This commit is contained in:
XMRig 2020-06-06 00:24:58 +07:00
parent 33bfecd49b
commit ea72052f50
No known key found for this signature in database
GPG key ID: 446A53638BE94409
15 changed files with 152 additions and 10 deletions

View file

@ -217,6 +217,7 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
doc.AddMember(StringRef(kAutosave), isAutoSave(), allocator);
doc.AddMember(StringRef(kBackground), isBackground(), allocator);
doc.AddMember(StringRef(kColors), Log::isColors(), allocator);
doc.AddMember(StringRef(kTitle), title().toJSON(), allocator);
# ifdef XMRIG_ALGO_RANDOMX
doc.AddMember(StringRef(kRandomX), rx().toJSON(doc), allocator);

View file

@ -90,6 +90,8 @@ static const option options[] = {
{ "verbose", 0, nullptr, IConfig::VerboseKey },
{ "proxy", 1, nullptr, IConfig::ProxyKey },
{ "data-dir", 1, nullptr, IConfig::DataDirKey },
{ "title", 1, nullptr, IConfig::TitleKey },
{ "no-title", 0, nullptr, IConfig::NoTitleKey },
# ifdef XMRIG_FEATURE_TLS
{ "tls", 0, nullptr, IConfig::TlsKey },
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },

View file

@ -168,6 +168,11 @@ static inline const std::string &usage()
u += " --export-topology export hwloc topology to a XML file and exit\n";
# endif
# ifdef XMRIG_OS_WIN
u += " --title set custom console window title\n";
u += " --no-title disable setting console window title\n";
# endif
return u;
}