notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some warnings fixed, nsf fixed, palettes, more code backported
[fceu.git]
/
video.c
diff --git
a/video.c
b/video.c
index
1b0298e
..
e9d3c2d
100644
(file)
--- a/
video.c
+++ b/
video.c
@@
-30,6
+30,9
@@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef GP2X
+#include <unistd.h>
+#endif
#include "types.h"
#include "video.h"
#include "types.h"
#include "video.h"
@@
-43,8
+46,6
@@
uint8 *XBuf=NULL;
int InitVirtualVideo(void)
{
int InitVirtualVideo(void)
{
- uint32 m;
-
if(!XBuf) /* Some driver code may allocate XBuf externally. */
if(!(XBuf = (uint8*) (FCEU_malloc(320 * 240))))
return 0;
if(!XBuf) /* Some driver code may allocate XBuf externally. */
if(!(XBuf = (uint8*) (FCEU_malloc(320 * 240))))
return 0;
@@
-235,7
+236,7
@@
int SaveSnapshot(void)
tmp+=16;
}
tmp+=16;
}
- if(compress(compmem,&compmemsize,mork,(totallines<<8)+totallines)!=Z_OK)
+ if(compress(compmem,
(unsigned long *)
&compmemsize,mork,(totallines<<8)+totallines)!=Z_OK)
{
if(mal) free(mal);
goto PNGerr;
{
if(mal) free(mal);
goto PNGerr;
@@
-249,6
+250,9
@@
int SaveSnapshot(void)
free(compmem);
fclose(pp);
free(compmem);
fclose(pp);
+#ifdef GP2X
+ sync();
+#endif
return u+1;
return u+1;