comparison config.c @ 1900:93960907807a

Added UI for selecting configured model
author Michael Pavone <pavone@retrodev.com>
date Sun, 16 Feb 2020 10:33:20 -0800
parents a4cae960fd08
children 5433252329fb
comparison
equal deleted inserted replaced
1899:789746b1a1b3 1900:93960907807a
320 uint32_t get_lowpass_cutoff(tern_node *config) 320 uint32_t get_lowpass_cutoff(tern_node *config)
321 { 321 {
322 char * lowpass_cutoff_str = tern_find_path(config, "audio\0lowpass_cutoff\0", TVAL_PTR).ptrval; 322 char * lowpass_cutoff_str = tern_find_path(config, "audio\0lowpass_cutoff\0", TVAL_PTR).ptrval;
323 return lowpass_cutoff_str ? atoi(lowpass_cutoff_str) : DEFAULT_LOWPASS_CUTOFF; 323 return lowpass_cutoff_str ? atoi(lowpass_cutoff_str) : DEFAULT_LOWPASS_CUTOFF;
324 } 324 }
325
326 tern_node *get_systems_config(void)
327 {
328 static tern_node *systems;
329 if (!systems) {
330 systems = parse_bundled_config("systems.cfg");
331 }
332 return systems;
333 }
334
335 tern_node *get_model(tern_node *config, system_type stype)
336 {
337 char *model = tern_find_path_default(config, "system\0model\0", (tern_val){.ptrval = "md1va3"}, TVAL_PTR);
338 return tern_find_node(get_systems_config(), model);
339 }