Browse Source

config: be a little less cryptic on what's going on in load_default_profile().

djm34
Noel Maersk 11 years ago
parent
commit
5430d1ee91
  1. 21
      config_parser.c

21
config_parser.c

@ -653,17 +653,27 @@ void load_default_config(void) @@ -653,17 +653,27 @@ void load_default_config(void)
* Startup functions
* *****************************************/
//assign default settings from default profile if set
// assign default settings from default profile if set
void load_default_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
if((profile = get_profile(default_profile.name)))
applog(LOG_WARNING, "Default profile name not set.");
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.devices = profile->devices;
default_profile.lookup_gap = profile->lookup_gap;
@ -682,7 +692,6 @@ void load_default_profile() @@ -682,7 +692,6 @@ void load_default_profile()
default_profile.shaders = profile->shaders;
default_profile.worksize = profile->worksize;
}
}
}
//apply default settings

Loading…
Cancel
Save