comparison blastem.c @ 1850:30f2821ffd65

Allow rom directory and rom name in screenshot path. Allow rom name in screenshot name. Remove ability for path variables to contain underscores
author Michael Pavone <pavone@retrodev.com>
date Tue, 23 Apr 2019 23:33:16 -0700
parents 7f4fac75b484
children 374a5ae694e8 b387f1c5a1d0
comparison
equal deleted inserted replaced
1849:6b5147f08846 1850:30f2821ffd65
265 char *savedir_template = tern_find_path(config, "ui\0save_path\0", TVAL_PTR).ptrval; 265 char *savedir_template = tern_find_path(config, "ui\0save_path\0", TVAL_PTR).ptrval;
266 if (!savedir_template) { 266 if (!savedir_template) {
267 savedir_template = "$USERDATA/blastem/$ROMNAME"; 267 savedir_template = "$USERDATA/blastem/$ROMNAME";
268 } 268 }
269 tern_node *vars = tern_insert_ptr(NULL, "ROMNAME", media->name); 269 tern_node *vars = tern_insert_ptr(NULL, "ROMNAME", media->name);
270 vars = tern_insert_ptr(vars, "ROMDIR", media->dir);
270 vars = tern_insert_ptr(vars, "HOME", get_home_dir()); 271 vars = tern_insert_ptr(vars, "HOME", get_home_dir());
271 vars = tern_insert_ptr(vars, "EXEDIR", get_exe_dir()); 272 vars = tern_insert_ptr(vars, "EXEDIR", get_exe_dir());
272 vars = tern_insert_ptr(vars, "USERDATA", (char *)get_userdata_dir()); 273 vars = tern_insert_ptr(vars, "USERDATA", (char *)get_userdata_dir());
273 char *save_dir = replace_vars(savedir_template, vars, 1); 274 char *save_dir = replace_vars(savedir_template, vars, 1);
274 tern_free(vars); 275 tern_free(vars);
341 } 342 }
342 #endif 343 #endif
343 } 344 }
344 345
345 static system_media cart, lock_on; 346 static system_media cart, lock_on;
347 const system_media *current_media(void)
348 {
349 return &cart;
350 }
351
346 void reload_media(void) 352 void reload_media(void)
347 { 353 {
348 if (!current_system) { 354 if (!current_system) {
349 return; 355 return;
350 } 356 }