MCPcopy Create free account
hub / github.com/DistroAV/DistroAV / MigrateSetting

Function MigrateSetting

src/config.cpp:190–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190void MigrateSetting(config_t *from, config_t *to, const char *section, const char *name)
191{
192 if (!config_has_user_value(from, section, name))
193 return;
194
195 if (ConfigTypeMap.count(name) == 0)
196 return;
197
198 const enum ObsConfigType type = ConfigTypeMap[name];
199
200 switch (type) {
201 case OBS_CONFIG_STRING:
202 config_set_string(to, section, name, config_get_string(from, section, name));
203
204 break;
205 case OBS_CONFIG_BOOL:
206 config_set_bool(to, section, name, config_get_bool(from, section, name));
207 break;
208 }
209 config_remove_value(from, section, name);
210 obs_log(LOG_INFO, "config: migrated configuration setting %s", name);
211}
212
213Config::Config()
214 : OutputEnabled(false),

Callers 1

GlobalToUserMigrationMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected