Merge pull request #87 from retro-wertz/fix_fds_not_saving
fix fds not saving game
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
DEBUG=0
|
DEBUG=0
|
||||||
|
PSS_STYLE=1
|
||||||
EXTERNAL_ZLIB=0
|
EXTERNAL_ZLIB=0
|
||||||
HAVE_GRIFFIN=1
|
HAVE_GRIFFIN=1
|
||||||
STATIC_LINKING=0
|
STATIC_LINKING=0
|
||||||
@@ -285,6 +286,7 @@ else
|
|||||||
TARGET := $(TARGET_NAME)_libretro.dll
|
TARGET := $(TARGET_NAME)_libretro.dll
|
||||||
CC = gcc
|
CC = gcc
|
||||||
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=src/drivers/libretro/link.T
|
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=src/drivers/libretro/link.T
|
||||||
|
PSS_STYLE :=2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
@@ -305,7 +307,13 @@ CFLAGS += -DWANT_GRIFFIN
|
|||||||
|
|
||||||
OBJECTS := $(SOURCES_C:.c=.o)
|
OBJECTS := $(SOURCES_C:.c=.o)
|
||||||
|
|
||||||
DEFINES := -D__LIBRETRO__ -DSOUND_QUALITY=0 -DPATH_MAX=1024 -DINLINE=inline -DPSS_STYLE=1 -DFCEU_VERSION_NUMERIC=9813 -DFRONTEND_SUPPORTS_RGB565 $(PLATFORM_DEFINES)
|
DEFINES := -D__LIBRETRO__ -DSOUND_QUALITY=0 -DPATH_MAX=1024 -DINLINE=inline -DFCEU_VERSION_NUMERIC=9813 -DFRONTEND_SUPPORTS_RGB565 $(PLATFORM_DEFINES)
|
||||||
|
|
||||||
|
ifeq ($(PSS_STYLE),2)
|
||||||
|
DEFINES += -DPSS_STYLE=2
|
||||||
|
else
|
||||||
|
DEFINES += -DPSS_STYLE=1
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(STATIC_LINKING),1)
|
ifeq ($(STATIC_LINKING),1)
|
||||||
DEFINES += -DSTATIC_LINKING
|
DEFINES += -DSTATIC_LINKING
|
||||||
|
|||||||
@@ -179,6 +179,11 @@ void FCEUI_SetRenderedLines(int ntscf, int ntscl, int palf, int pall);
|
|||||||
below this directory. */
|
below this directory. */
|
||||||
void FCEUI_SetBaseDirectory(char *dir);
|
void FCEUI_SetBaseDirectory(char *dir);
|
||||||
|
|
||||||
|
#ifdef __LIBRETRO__
|
||||||
|
void FCEUI_SetSaveDirectory(char *sav_dir);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Tells FCE Ultra to copy the palette data pointed to by pal and use it.
|
/* Tells FCE Ultra to copy the palette data pointed to by pal and use it.
|
||||||
Data pointed to by pal needs to be 64*3 bytes in length.
|
Data pointed to by pal needs to be 64*3 bytes in length.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1637,6 +1637,7 @@ bool retro_load_game(const struct retro_game_info *game)
|
|||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
char* dir=NULL;
|
char* dir=NULL;
|
||||||
|
char* sav_dir=NULL;
|
||||||
size_t fourscore_len = sizeof(fourscore_db_list) / sizeof(fourscore_db_list[0]);
|
size_t fourscore_len = sizeof(fourscore_db_list) / sizeof(fourscore_db_list[0]);
|
||||||
size_t famicom_4p_len = sizeof(famicom_4p_db_list) / sizeof(famicom_4p_db_list[0]);
|
size_t famicom_4p_len = sizeof(famicom_4p_db_list) / sizeof(famicom_4p_db_list[0]);
|
||||||
|
|
||||||
@@ -1706,6 +1707,8 @@ bool retro_load_game(const struct retro_game_info *game)
|
|||||||
|
|
||||||
if (environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &dir) && dir)
|
if (environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &dir) && dir)
|
||||||
FCEUI_SetBaseDirectory(dir);
|
FCEUI_SetBaseDirectory(dir);
|
||||||
|
if (environ_cb(RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY, &sav_dir) && sav_dir)
|
||||||
|
FCEUI_SetSaveDirectory(sav_dir);
|
||||||
|
|
||||||
FCEUI_Initialize();
|
FCEUI_Initialize();
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
|
|
||||||
static char BaseDirectory[2048];
|
static char BaseDirectory[2048];
|
||||||
|
static char SaveDirectory[2048];
|
||||||
static char FileBase[2048];
|
static char FileBase[2048];
|
||||||
static char FileExt[2048]; /* Includes the . character, as in ".nes" */
|
static char FileExt[2048]; /* Includes the . character, as in ".nes" */
|
||||||
|
|
||||||
@@ -53,6 +54,12 @@ void FCEUI_SetBaseDirectory(char *dir)
|
|||||||
BaseDirectory[2047] = 0;
|
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. ^_^
|
static char *odirs[FCEUIOD__COUNT] = { 0, 0, 0, 0, 0, 0 }; // odirs, odors. ^_^
|
||||||
|
|
||||||
void FCEUI_SetDirOverride(int which, char *n)
|
void FCEUI_SetDirOverride(int which, char *n)
|
||||||
@@ -87,6 +94,9 @@ char *FCEU_MakeFName(int type, int id1, char *cd1)
|
|||||||
else
|
else
|
||||||
sprintf(tmp, "%s"PSS "gameinfo"PSS "%s.pal", BaseDirectory, FileBase);
|
sprintf(tmp, "%s"PSS "gameinfo"PSS "%s.pal", BaseDirectory, FileBase);
|
||||||
break;
|
break;
|
||||||
|
case FCEUMKF_FDS:
|
||||||
|
sprintf(tmp, "%s"PSS "%s.fds", SaveDirectory, FileBase);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user