(State) Use same function signatures as Mednafen mainline

This commit is contained in:
twinaphex 2012-11-14 01:41:02 +01:00
parent 30b6482509
commit 2949a11694
3 changed files with 7 additions and 17 deletions

View File

@ -534,7 +534,7 @@ size_t retro_serialize_size(void)
StateMem st;
memset(&st, 0, sizeof(st));
if (!MDFNSS_SaveSM(&st))
if (!MDFNSS_SaveSM(&st, 0, 0, NULL, NULL, NULL))
{
fprintf(stderr, "[mednafen]: Module %s doesn't support save states.\n", game->shortname);
return 0;
@ -551,7 +551,7 @@ bool retro_serialize(void *data, size_t size)
st.data = (uint8_t*)data;
st.malloced = size;
return MDFNSS_SaveSM(&st);
return MDFNSS_SaveSM(&st, 0, 0, NULL, NULL, NULL);
}
bool retro_unserialize(const void *data, size_t size)
@ -561,7 +561,7 @@ bool retro_unserialize(const void *data, size_t size)
st.data = (uint8_t*)data;
st.len = size;
return MDFNSS_LoadSM(&st);
return MDFNSS_LoadSM(&st, 0, 0);
}
void *retro_get_memory_data(unsigned)

View File

@ -503,7 +503,7 @@ int MDFNSS_StateAction(StateMem *st, int load, int data_only, SFORMAT *sf, const
return(MDFNSS_StateAction(st, load, 0, love));
}
int MDFNSS_SaveSM(StateMem *st)
int MDFNSS_SaveSM(StateMem *st, int, int, const MDFN_Surface*, const MDFN_Rect*, const MDFN_Rect*)
{
static const char *header_magic = "MDFNSVST";
uint8 header[32];
@ -527,7 +527,7 @@ int MDFNSS_SaveSM(StateMem *st)
return(1);
}
int MDFNSS_LoadSM(StateMem *st)
int MDFNSS_LoadSM(StateMem *st, int, int)
{
uint8 header[32];
uint32 stateversion;

View File

@ -4,8 +4,6 @@
#include "video.h"
#include "state-common.h"
void MDFNSS_GetStateInfo(const char *filename, StateStatusStruct *status);
typedef struct
{
uint8 *data;
@ -27,10 +25,8 @@ int32 smem_seek(StateMem *st, uint32 offset, int whence);
int smem_write32le(StateMem *st, uint32 b);
int smem_read32le(StateMem *st, uint32 *b);
int MDFNSS_SaveSM(StateMem *st);
int MDFNSS_LoadSM(StateMem *st);
void MDFNSS_CheckStates(void);
int MDFNSS_SaveSM(StateMem *st, int, int, const MDFN_Surface*, const MDFN_Rect*, const MDFN_Rect*);
int MDFNSS_LoadSM(StateMem *st, int, int);
// Flag for a single, >= 1 byte native-endian variable
#define MDFNSTATE_RLSB 0x80000000
@ -131,10 +127,4 @@ class SSDescriptor
int MDFNSS_StateAction(StateMem *st, int load, int data_only, std::vector <SSDescriptor> &sections);
int MDFNSS_StateAction(StateMem *st, int load, int data_only, SFORMAT *sf, const char *name, bool optional = 0);
void MDFN_StateEvilFlushMovieLove(void);
bool MDFN_StateEvilIsRunning(void);
void MDFN_StateEvilBegin(void);
void MDFN_StateEvilEnd(void);
int MDFN_StateEvil(int);
#endif