mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-27 06:11:56 +00:00
config: be a little less cryptic on what's going on in load_default_profile().
This commit is contained in:
parent
0886740a5f
commit
5430d1ee91
@ -658,12 +658,22 @@ void load_default_profile()
|
|||||||
{
|
{
|
||||||
struct profile *profile;
|
struct profile *profile;
|
||||||
|
|
||||||
//if a default profile name is set
|
if(empty_string(default_profile.name))
|
||||||
if(!empty_string(default_profile.name))
|
|
||||||
{
|
{
|
||||||
//find profile and copy settings
|
applog(LOG_WARNING, "Default profile name not set.");
|
||||||
if((profile = get_profile(default_profile.name)))
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
|
// find profile ...
|
||||||
|
profile = get_profile(default_profile.name);
|
||||||
|
if (!profile) {
|
||||||
|
applog(LOG_WARNING, "Could not load default profile %s",
|
||||||
|
default_profile.name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ... and copy settings
|
||||||
default_profile.algorithm = profile->algorithm;
|
default_profile.algorithm = profile->algorithm;
|
||||||
default_profile.devices = profile->devices;
|
default_profile.devices = profile->devices;
|
||||||
default_profile.lookup_gap = profile->lookup_gap;
|
default_profile.lookup_gap = profile->lookup_gap;
|
||||||
@ -683,7 +693,6 @@ void load_default_profile()
|
|||||||
default_profile.worksize = profile->worksize;
|
default_profile.worksize = profile->worksize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//apply default settings
|
//apply default settings
|
||||||
void apply_defaults()
|
void apply_defaults()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user