mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-10-21 06:18:34 +02:00
Merge branch 'rocket69'
This commit is contained in:
@@ -100,14 +100,15 @@ bool jconf::GetThreadConfig(size_t id, thd_cfg &cfg)
|
||||
if(!oThdConf.IsObject())
|
||||
return false;
|
||||
|
||||
const Value *mode, *aff;
|
||||
const Value *mode, *no_prefetch, *aff;
|
||||
mode = GetObjectMember(oThdConf, "low_power_mode");
|
||||
no_prefetch = GetObjectMember(oThdConf, "no_prefetch");
|
||||
aff = GetObjectMember(oThdConf, "affine_to_cpu");
|
||||
|
||||
if(mode == nullptr || aff == nullptr)
|
||||
if(mode == nullptr || no_prefetch == nullptr || aff == nullptr)
|
||||
return false;
|
||||
|
||||
if(!mode->IsBool())
|
||||
if(!mode->IsBool() || !no_prefetch->IsBool())
|
||||
return false;
|
||||
|
||||
if(!aff->IsNumber() && !aff->IsBool())
|
||||
@@ -117,6 +118,8 @@ bool jconf::GetThreadConfig(size_t id, thd_cfg &cfg)
|
||||
return false;
|
||||
|
||||
cfg.bDoubleMode = mode->GetBool();
|
||||
cfg.bNoPrefetch = no_prefetch->GetBool();
|
||||
|
||||
if(aff->IsNumber())
|
||||
cfg.iCpuAff = aff->GetInt64();
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user