}
-// 16: rrrr rggg gggb bbbb
+// 16: rrrr rggg gg0b bbbb
void FCEUD_SetPalette(uint8 index, uint8 r, uint8 g, uint8 b)
{
/* note: menu depends on bit5 being 0 */
}
-void BlitScreen(uint8 *buf)
+void BlitPrepare(int skip)
{
framesEmulated++;
- if (!buf) {
+ if (skip) {
printFps(0);
return;
}
framesRendered++;
- printFps(gp2x_screen);
-
if (eoptions & EO_CLIPSIDES)
{
int i, *p = (int *) ((char *)gp2x_screen + 32);
}
}
+ printFps(gp2x_screen);
+
if (Settings.scaling == 3)
{
soft_scale((char *)gp2x_screen + 32, gp2x_palette16, srendline, erendline-srendline);
memset32((int *)((char *)gp2x_screen + 32), 0, srendline*320*2/4);
}
- gp2x_video_flip();
- XBuf = gp2x_screen;
+ /* at this point we should be done with the frame */
+ gp2x_video_flush_cache();
+}
+
+
+void BlitScreen(int skip)
+{
+ if (!skip)
+ {
+ gp2x_video_flip();
+ XBuf = gp2x_screen;
+ }
}