diff options
author | Michael Pavone <pavone@retrodev.com> | 2020-02-16 10:33:20 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2020-02-16 10:33:20 -0800 |
commit | c8680028c6fc9570f6b8324285fed925d19f053c (patch) | |
tree | 34ce8d7d7f2fa64ea7231d0032b5f0ef6061cb57 /config.c | |
parent | b74dd5f387ebb8e7dc542dd5fd97284b67ba816c (diff) |
Added UI for selecting configured model
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -322,3 +322,18 @@ uint32_t get_lowpass_cutoff(tern_node *config) char * lowpass_cutoff_str = tern_find_path(config, "audio\0lowpass_cutoff\0", TVAL_PTR).ptrval; return lowpass_cutoff_str ? atoi(lowpass_cutoff_str) : DEFAULT_LOWPASS_CUTOFF; } + +tern_node *get_systems_config(void) +{ + static tern_node *systems; + if (!systems) { + systems = parse_bundled_config("systems.cfg"); + } + return systems; +} + +tern_node *get_model(tern_node *config, system_type stype) +{ + char *model = tern_find_path_default(config, "system\0model\0", (tern_val){.ptrval = "md1va3"}, TVAL_PTR); + return tern_find_node(get_systems_config(), model); +} |