X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fgp2x%2Fminimal.c;h=86bfdfb74aedc48b8c45996834a8a578e81276c3;hb=0bb3fe122854be9af6c3024fef9f503d27bc63a1;hp=1ac51293b6f1f70ff2190e0c634d0d38aaddde8e;hpb=e6ee752982da44a60a9a6b5916d7642ba2dd8b9e;p=fceu.git diff --git a/drivers/gp2x/minimal.c b/drivers/gp2x/minimal.c index 1ac5129..86bfdfb 100644 --- a/drivers/gp2x/minimal.c +++ b/drivers/gp2x/minimal.c @@ -68,7 +68,8 @@ void gp2x_video_flip(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(addr, addr + 320*240*2, 0); + flushcache(gp2x_screen, (char *)gp2x_screen + 320*240*2, 0); lsw = (unsigned short) addr; msw = (unsigned short)(addr >> 16); @@ -324,14 +325,14 @@ void gp2x_deinit(void) gp2x_memregs[0x2912>>1] = gp2x_screenaddr_old[2]; gp2x_memregs[0x2914>>1] = gp2x_screenaddr_old[3]; + gp2x_usbjoy_deinit(); + munmap(gp2x_screens[0], FRAMEBUFF_WHOLESIZE); munmap((void *)gp2x_memregs, 0x10000); close(memdev); close(mixerdev); if (sounddev > 0) close(sounddev); - gp2x_usbjoy_deinit(); - printf("all done, running "); // Zaq121's alternative frontend support from MAME