Added config option "dmi" and command line option "--no-dmi".

This commit is contained in:
XMRig 2021-01-20 16:02:48 +07:00
parent efc5e5d811
commit 9a02007900
No known key found for this signature in database
GPG key ID: 446A53638BE94409
11 changed files with 121 additions and 56 deletions

View file

@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -50,6 +50,22 @@ class Config : public BaseConfig
public:
XMRIG_DISABLE_COPY_MOVE(Config);
# ifdef XMRIG_FEATURE_OPENCL
static const char *kOcl;
# endif
# ifdef XMRIG_FEATURE_CUDA
static const char *kCuda;
# endif
# if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
static const char *kHealthPrintTime;
# endif
# ifdef XMRIG_FEATURE_DMI
static const char *kDMI;
# endif
Config();
~Config() override;
@ -70,7 +86,13 @@ public:
# if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
uint32_t healthPrintTime() const;
# else
uint32_t healthPrintTime() const { return 0; }
uint32_t healthPrintTime() const { return 0; }
# endif
# ifdef XMRIG_FEATURE_DMI
bool isDMI() const;
# else
static constexpr inline bool isDMI() { return false; }
# endif
bool isShouldSave() const;