X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2Fgp2x.c;h=3b5d125e2368cf9b5010302940e2ced102779d93;hb=f9a37a0225c13111c81ad25653bd887b721f9c1e;hp=c0396d9d7162ff9456a2e8bd7bbbb81b78e52ad5;hpb=b9f8cb3d6d8d0b5965fab83a27fc356a56442ddb;p=libpicofe.git diff --git a/gp2x/gp2x.c b/gp2x/gp2x.c index c0396d9..3b5d125 100644 --- a/gp2x/gp2x.c +++ b/gp2x/gp2x.c @@ -157,6 +157,15 @@ void gp2x_video_wait_vsync(void) } +void gp2x_video_flush_cache(void) +{ + // since we are using the mmu hack, we must flush the cache first + // (the params are most likely wrong, but they seem to work somehow) + //flushcache(addr, addr + 320*240*2, 0); + flushcache(gp2x_screen, (char *)gp2x_screen + 320*240*2, 0); +} + + void gp2x_memcpy_buffers(int buffers, void *data, int offset, int len) { char *dst; @@ -184,9 +193,7 @@ void gp2x_memset_all_buffers(int offset, int byte, int len) void gp2x_pd_clone_buffer2(void) { - memcpy(gp2x_screen, gp2x_screens[2], 320*240); - memset(gp2x_screen, 0xe0, 320*8); - memset(gp2x_screen + 320*232, 0xe0, 320*8); + memcpy(gp2x_screen, gp2x_screens[2], 320*240*2); }