X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=drivers%2Fgp2x%2Fgp2x-video.c;h=d8524b6df410fd3aa55f954f7fccec8e0abda4ab;hp=198222d32d6adc72e22fa0dfdffe5564269af05a;hb=7b356ee3dc5d7e54d9dc06c413f84380d1044441;hpb=15d2d2584cc71389f06b969d7cd836332add97c6 diff --git a/drivers/gp2x/gp2x-video.c b/drivers/gp2x/gp2x-video.c index 198222d..d8524b6 100644 --- a/drivers/gp2x/gp2x-video.c +++ b/drivers/gp2x/gp2x-video.c @@ -156,11 +156,11 @@ static INLINE void printFps(uint8 *screen) } -void BlitScreen(uint8 *buf) +void BlitPrepare(int skip) { framesEmulated++; - if (!buf) { + if (skip) { printFps(0); return; } @@ -185,8 +185,18 @@ void BlitScreen(uint8 *buf) 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; + } }