|
|
@ -656,15 +656,15 @@ void load_default_config(void) |
|
|
|
// 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; |
|
|
|
applog(LOG_DEBUG, "default_profile.name is %s", default_profile.name); |
|
|
|
|
|
|
|
if (empty_string(default_profile.name)) |
|
|
|
if(empty_string(default_profile.name)) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
applog(LOG_WARNING, "Default profile name not set."); |
|
|
|
applog(LOG_WARNING, "Default profile name is not set."); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
struct profile *profile; |
|
|
|
|
|
|
|
|
|
|
|
// find profile ...
|
|
|
|
// find profile ...
|
|
|
|
profile = get_profile(default_profile.name); |
|
|
|
profile = get_profile(default_profile.name); |
|
|
|
if (!profile) { |
|
|
|
if (!profile) { |
|
|
@ -691,7 +691,6 @@ void load_default_profile() |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
default_profile.shaders = profile->shaders; |
|
|
|
default_profile.shaders = profile->shaders; |
|
|
|
default_profile.worksize = profile->worksize; |
|
|
|
default_profile.worksize = profile->worksize; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//apply default settings
|
|
|
|
//apply default settings
|
|
|
@ -699,48 +698,48 @@ void apply_defaults() |
|
|
|
{ |
|
|
|
{ |
|
|
|
set_algorithm(&opt_algorithm, default_profile.algorithm.name); |
|
|
|
set_algorithm(&opt_algorithm, default_profile.algorithm.name); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.devices)) |
|
|
|
if (!empty_string(default_profile.devices)) |
|
|
|
set_devices((char *)default_profile.devices); |
|
|
|
set_devices((char *)default_profile.devices); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.intensity)) |
|
|
|
if (!empty_string(default_profile.intensity)) |
|
|
|
set_intensity(default_profile.intensity); |
|
|
|
set_intensity(default_profile.intensity); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.xintensity)) |
|
|
|
if (!empty_string(default_profile.xintensity)) |
|
|
|
set_xintensity(default_profile.xintensity); |
|
|
|
set_xintensity(default_profile.xintensity); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.rawintensity)) |
|
|
|
if (!empty_string(default_profile.rawintensity)) |
|
|
|
set_rawintensity(default_profile.rawintensity); |
|
|
|
set_rawintensity(default_profile.rawintensity); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.lookup_gap)) |
|
|
|
if (!empty_string(default_profile.lookup_gap)) |
|
|
|
set_lookup_gap((char *)default_profile.lookup_gap); |
|
|
|
set_lookup_gap((char *)default_profile.lookup_gap); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.thread_concurrency)) |
|
|
|
if (!empty_string(default_profile.thread_concurrency)) |
|
|
|
set_thread_concurrency(default_profile.thread_concurrency); |
|
|
|
set_thread_concurrency(default_profile.thread_concurrency); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_ADL |
|
|
|
#ifdef HAVE_ADL |
|
|
|
if(!empty_string(default_profile.gpu_engine)) |
|
|
|
if (!empty_string(default_profile.gpu_engine)) |
|
|
|
set_gpu_engine(default_profile.gpu_engine); |
|
|
|
set_gpu_engine(default_profile.gpu_engine); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.gpu_memclock)) |
|
|
|
if (!empty_string(default_profile.gpu_memclock)) |
|
|
|
set_gpu_memclock(default_profile.gpu_memclock); |
|
|
|
set_gpu_memclock(default_profile.gpu_memclock); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.gpu_threads)) |
|
|
|
if (!empty_string(default_profile.gpu_threads)) |
|
|
|
set_gpu_threads(default_profile.gpu_threads); |
|
|
|
set_gpu_threads(default_profile.gpu_threads); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.gpu_fan)) |
|
|
|
if (!empty_string(default_profile.gpu_fan)) |
|
|
|
set_gpu_fan(default_profile.gpu_fan); |
|
|
|
set_gpu_fan(default_profile.gpu_fan); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.gpu_powertune)) |
|
|
|
if (!empty_string(default_profile.gpu_powertune)) |
|
|
|
set_gpu_powertune((char *)default_profile.gpu_powertune); |
|
|
|
set_gpu_powertune((char *)default_profile.gpu_powertune); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.gpu_vddc)) |
|
|
|
if (!empty_string(default_profile.gpu_vddc)) |
|
|
|
set_gpu_vddc((char *)default_profile.gpu_vddc); |
|
|
|
set_gpu_vddc((char *)default_profile.gpu_vddc); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.shaders)) |
|
|
|
if (!empty_string(default_profile.shaders)) |
|
|
|
set_shaders((char *)default_profile.shaders); |
|
|
|
set_shaders((char *)default_profile.shaders); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty_string(default_profile.worksize)) |
|
|
|
if (!empty_string(default_profile.worksize)) |
|
|
|
set_worksize((char *)default_profile.worksize); |
|
|
|
set_worksize((char *)default_profile.worksize); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -749,7 +748,7 @@ void apply_pool_profiles() |
|
|
|
{ |
|
|
|
{ |
|
|
|
int i; |
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
for(i=total_pools;i--;) |
|
|
|
for (i=total_pools; i--;) |
|
|
|
{ |
|
|
|
{ |
|
|
|
apply_pool_profile(pools[i]); |
|
|
|
apply_pool_profile(pools[i]); |
|
|
|
} |
|
|
|
} |
|
|
|