Mercurial > repos > blastem
comparison menu.c @ 1326:071e761bcdcf
Fix a deficiency in the way types were handled in my ternary tree. Fixes in which some paths that were constructed from a template with variables would sometimes get an extra garbage character thrown in
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 21 Apr 2017 23:35:32 -0700 |
parents | 72ea3885e7b5 |
children | e6efe6b2aee9 |
comparison
equal
deleted
inserted
replaced
1325:58bfbed6cdb5 | 1326:071e761bcdcf |
---|---|
164 m68k_context *m68k = context; | 164 m68k_context *m68k = context; |
165 genesis_context *gen = m68k->system; | 165 genesis_context *gen = m68k->system; |
166 menu_context *menu = gen->extra; | 166 menu_context *menu = gen->extra; |
167 if (!menu) { | 167 if (!menu) { |
168 gen->extra = menu = calloc(1, sizeof(menu_context)); | 168 gen->extra = menu = calloc(1, sizeof(menu_context)); |
169 menu->curpath = tern_find_path(config, "ui\0initial_path\0").ptrval; | 169 menu->curpath = tern_find_path(config, "ui\0initial_path\0", TVAL_PTR).ptrval; |
170 if (!menu->curpath){ | 170 if (!menu->curpath){ |
171 #ifdef __ANDROID__ | 171 #ifdef __ANDROID__ |
172 menu->curpath = get_external_storage_path(); | 172 menu->curpath = get_external_storage_path(); |
173 #else | 173 #else |
174 menu->curpath = "$HOME"; | 174 menu->curpath = "$HOME"; |