mirror of
https://github.com/dborth/fceugx.git
synced 2024-10-31 22:45:05 +01:00
save menu settings
This commit is contained in:
parent
04cb373864
commit
f860642125
@ -105,7 +105,7 @@ static int GCReadChunk(int chunkid, SFORMAT *sf)
|
||||
memfread(&thischunk, 4);
|
||||
memfread(&chunklength, 4);
|
||||
|
||||
if (strcmp(chunk, "CHNK") == 0)
|
||||
if (memcmp(&chunk, "CHNK", 4) == 0)
|
||||
{
|
||||
if (chunkid == thischunk)
|
||||
{
|
||||
@ -253,18 +253,14 @@ extern void (*SPostSave)(void);
|
||||
static int GCFCEUSS_Save(int method)
|
||||
{
|
||||
int totalsize = 0;
|
||||
static unsigned char header[16] = "FCS\xff";
|
||||
unsigned char header[16] = "FCS\xff";
|
||||
char chunk[] = "CHKE";
|
||||
int zero = 0;
|
||||
char comment[2][32];
|
||||
memset(comment, 0, 64);
|
||||
int version = 0x981211;
|
||||
memcpy(&header[8], &version, 4); // Add version ID
|
||||
|
||||
memopen(); // Reset Memory File
|
||||
|
||||
// Add version ID
|
||||
int mcversion = 0x981211;
|
||||
memcpy(&header[8], &mcversion, 4);
|
||||
|
||||
// Do internal Saving
|
||||
FCEUPPU_SaveState();
|
||||
FCEUSND_SaveState();
|
||||
|
@ -1887,6 +1887,9 @@ static int MenuGameSettings()
|
||||
}
|
||||
}
|
||||
|
||||
if(menu == MENU_GAME || menu == MENU_EXIT)
|
||||
SavePrefs(NOTSILENT);
|
||||
|
||||
HaltGui();
|
||||
|
||||
mainWindow->Remove(&w);
|
||||
|
Loading…
Reference in New Issue
Block a user