fix fds not saving game

This commit is contained in:
retro-wertz
2017-03-15 02:32:00 +08:00
parent 18a4358112
commit 472b1e6f17
3 changed files with 18 additions and 0 deletions

View File

@@ -42,6 +42,7 @@
#include "md5.h"
static char BaseDirectory[2048];
static char SaveDirectory[2048];
static char FileBase[2048];
static char FileExt[2048]; /* Includes the . character, as in ".nes" */
@@ -53,6 +54,12 @@ void FCEUI_SetBaseDirectory(char *dir)
BaseDirectory[2047] = 0;
}
void FCEUI_SetSaveDirectory(char *sav_dir)
{
strncpy(SaveDirectory, sav_dir, 2047);
SaveDirectory[2047] = 0;
}
static char *odirs[FCEUIOD__COUNT] = { 0, 0, 0, 0, 0, 0 }; // odirs, odors. ^_^
void FCEUI_SetDirOverride(int which, char *n)
@@ -87,6 +94,9 @@ char *FCEU_MakeFName(int type, int id1, char *cd1)
else
sprintf(tmp, "%s"PSS "gameinfo"PSS "%s.pal", BaseDirectory, FileBase);
break;
case FCEUMKF_FDS:
sprintf(tmp, "%s"PSS "%s.fds", SaveDirectory, FileBase);
break;
default:
break;
}