Support suffix for home dir.

This commit is contained in:
sorgelig
2020-05-14 17:19:29 +08:00
parent e118e4f3cb
commit b1a481f24c
8 changed files with 42 additions and 30 deletions

View File

@@ -161,8 +161,15 @@ char *user_io_get_core_name()
return core_name;
}
char *user_io_get_core_path(void)
char *user_io_get_core_path(const char *suffix)
{
static char tmp[1024];
if (suffix)
{
strcpy(tmp, core_dir);
strcat(tmp, suffix);
return tmp;
}
return core_dir;
}
@@ -1804,7 +1811,7 @@ int user_io_file_tx(const char* name, unsigned char index, char opensave, char m
if ((index >> 6) == 1 || (index >> 6) == 2)
{
fileTYPE fg = {};
if (!FileOpen(&fg, user_io_make_filepath(HomeDir, "goomba.rom")))
if (!FileOpen(&fg, user_io_make_filepath(HomeDir(), "goomba.rom")))
{
dosend = 0;
Info("Cannot open goomba.rom!");