mirror of
https://github.com/dborth/fceugx.git
synced 2025-01-07 14:28:18 +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(&thischunk, 4);
|
||||||
memfread(&chunklength, 4);
|
memfread(&chunklength, 4);
|
||||||
|
|
||||||
if (strcmp(chunk, "CHNK") == 0)
|
if (memcmp(&chunk, "CHNK", 4) == 0)
|
||||||
{
|
{
|
||||||
if (chunkid == thischunk)
|
if (chunkid == thischunk)
|
||||||
{
|
{
|
||||||
@ -253,18 +253,14 @@ extern void (*SPostSave)(void);
|
|||||||
static int GCFCEUSS_Save(int method)
|
static int GCFCEUSS_Save(int method)
|
||||||
{
|
{
|
||||||
int totalsize = 0;
|
int totalsize = 0;
|
||||||
static unsigned char header[16] = "FCS\xff";
|
unsigned char header[16] = "FCS\xff";
|
||||||
char chunk[] = "CHKE";
|
char chunk[] = "CHKE";
|
||||||
int zero = 0;
|
int zero = 0;
|
||||||
char comment[2][32];
|
int version = 0x981211;
|
||||||
memset(comment, 0, 64);
|
memcpy(&header[8], &version, 4); // Add version ID
|
||||||
|
|
||||||
memopen(); // Reset Memory File
|
memopen(); // Reset Memory File
|
||||||
|
|
||||||
// Add version ID
|
|
||||||
int mcversion = 0x981211;
|
|
||||||
memcpy(&header[8], &mcversion, 4);
|
|
||||||
|
|
||||||
// Do internal Saving
|
// Do internal Saving
|
||||||
FCEUPPU_SaveState();
|
FCEUPPU_SaveState();
|
||||||
FCEUSND_SaveState();
|
FCEUSND_SaveState();
|
||||||
|
@ -1887,6 +1887,9 @@ static int MenuGameSettings()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(menu == MENU_GAME || menu == MENU_EXIT)
|
||||||
|
SavePrefs(NOTSILENT);
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
|
|
||||||
mainWindow->Remove(&w);
|
mainWindow->Remove(&w);
|
||||||
|
Loading…
Reference in New Issue
Block a user