mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-26 22:02:09 +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
@ -653,35 +653,44 @@ void load_default_config(void)
|
|||||||
* Startup functions
|
* Startup functions
|
||||||
* *****************************************/
|
* *****************************************/
|
||||||
|
|
||||||
//assign default settings from default profile if set
|
// assign default settings from default profile if set
|
||||||
void load_default_profile()
|
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;
|
||||||
{
|
}
|
||||||
default_profile.algorithm = profile->algorithm;
|
else
|
||||||
default_profile.devices = profile->devices;
|
{
|
||||||
default_profile.lookup_gap = profile->lookup_gap;
|
// find profile ...
|
||||||
default_profile.intensity = profile->intensity;
|
profile = get_profile(default_profile.name);
|
||||||
default_profile.xintensity = profile->xintensity;
|
if (!profile) {
|
||||||
default_profile.rawintensity = profile->rawintensity;
|
applog(LOG_WARNING, "Could not load default profile %s",
|
||||||
default_profile.thread_concurrency = profile->thread_concurrency;
|
default_profile.name);
|
||||||
#ifdef HAVE_ADL
|
return;
|
||||||
default_profile.gpu_engine = profile->gpu_engine;
|
|
||||||
default_profile.gpu_memclock = profile->gpu_memclock;
|
|
||||||
default_profile.gpu_threads = profile->gpu_threads;
|
|
||||||
default_profile.gpu_fan = profile->gpu_fan;
|
|
||||||
default_profile.gpu_powertune = profile->gpu_powertune;
|
|
||||||
default_profile.gpu_vddc = profile->gpu_vddc;
|
|
||||||
#endif
|
|
||||||
default_profile.shaders = profile->shaders;
|
|
||||||
default_profile.worksize = profile->worksize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ... and copy settings
|
||||||
|
default_profile.algorithm = profile->algorithm;
|
||||||
|
default_profile.devices = profile->devices;
|
||||||
|
default_profile.lookup_gap = profile->lookup_gap;
|
||||||
|
default_profile.intensity = profile->intensity;
|
||||||
|
default_profile.xintensity = profile->xintensity;
|
||||||
|
default_profile.rawintensity = profile->rawintensity;
|
||||||
|
default_profile.thread_concurrency = profile->thread_concurrency;
|
||||||
|
#ifdef HAVE_ADL
|
||||||
|
default_profile.gpu_engine = profile->gpu_engine;
|
||||||
|
default_profile.gpu_memclock = profile->gpu_memclock;
|
||||||
|
default_profile.gpu_threads = profile->gpu_threads;
|
||||||
|
default_profile.gpu_fan = profile->gpu_fan;
|
||||||
|
default_profile.gpu_powertune = profile->gpu_powertune;
|
||||||
|
default_profile.gpu_vddc = profile->gpu_vddc;
|
||||||
|
#endif
|
||||||
|
default_profile.shaders = profile->shaders;
|
||||||
|
default_profile.worksize = profile->worksize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user