Mercurial > repos > blastem
diff 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 |
line wrap: on
line diff
--- a/blastem.c Tue Apr 23 23:31:34 2019 -0700 +++ b/blastem.c Tue Apr 23 23:33:16 2019 -0700 @@ -267,6 +267,7 @@ savedir_template = "$USERDATA/blastem/$ROMNAME"; } tern_node *vars = tern_insert_ptr(NULL, "ROMNAME", media->name); + vars = tern_insert_ptr(vars, "ROMDIR", media->dir); vars = tern_insert_ptr(vars, "HOME", get_home_dir()); vars = tern_insert_ptr(vars, "EXEDIR", get_exe_dir()); vars = tern_insert_ptr(vars, "USERDATA", (char *)get_userdata_dir()); @@ -343,6 +344,11 @@ } static system_media cart, lock_on; +const system_media *current_media(void) +{ + return &cart; +} + void reload_media(void) { if (!current_system) {