notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
start using libpicofe, move some files
[fceu.git]
/
cart.c
diff --git
a/cart.c
b/cart.c
index
742f9b0
..
b159f39
100644
(file)
--- a/
cart.c
+++ b/
cart.c
@@
-22,9
+22,14
@@
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
+#ifdef GP2X
+#include <unistd.h> // for sync()
+#endif
+
#include "types.h"
#include "fce.h"
#include "ppu.h"
#include "types.h"
#include "fce.h"
#include "ppu.h"
+#include "ppu098.h"
#include "cart.h"
#include "memory.h"
#include "cart.h"
#include "memory.h"
@@
-35,8
+40,6
@@
#include "svga.h"
#include "file.h"
#include "svga.h"
#include "file.h"
-#define FCEUPPU_LineUpdate(...)
-
/*
This file contains all code for coordinating the mapping in of the
address space external to the NES.
/*
This file contains all code for coordinating the mapping in of the
address space external to the NES.
@@
-683,6
+686,10
@@
void FCEU_SaveGameSave(CartInfo *LocalHWInfo)
fwrite(LocalHWInfo->SaveGame[x],1,
LocalHWInfo->SaveGameLen[x],sp);
}
fwrite(LocalHWInfo->SaveGame[x],1,
LocalHWInfo->SaveGameLen[x],sp);
}
+ fclose(sp);
+#ifdef GP2X
+ sync();
+#endif
}
free(soot);
}
}
free(soot);
}
@@
-706,6
+713,7
@@
void FCEU_LoadGameSave(CartInfo *LocalHWInfo)
for(x=0;x<4;x++)
if(LocalHWInfo->SaveGame[x])
fread(LocalHWInfo->SaveGame[x],1,LocalHWInfo->SaveGameLen[x],sp);
for(x=0;x<4;x++)
if(LocalHWInfo->SaveGame[x])
fread(LocalHWInfo->SaveGame[x],1,LocalHWInfo->SaveGameLen[x],sp);
+ fclose(sp);
}
free(soot);
}
}
free(soot);
}