X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fgp2x%2Fminimal.c;h=e11643e86e126919601cee85674996f8377ab0cf;hb=32a0f49f4d70fe79def8718ec0b4e2460d629d6c;hp=9716e5b9f5216ec651969670febb38fc7e09ddf5;hpb=989672f4f2b4b4b2b373271374e6546546091c10;p=fceu.git diff --git a/drivers/gp2x/minimal.c b/drivers/gp2x/minimal.c index 9716e5b..e11643e 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); @@ -219,7 +220,10 @@ void gp2x_start_sound(int rate, int bits, int stereo) if (sounddev > 0) close(sounddev); sounddev = open("/dev/dsp", O_WRONLY|O_ASYNC); if (sounddev == -1) + { printf("open(\"/dev/dsp\") failed with %i\n", errno); + return; + } ioctl(sounddev, SNDCTL_DSP_SPEED, &rate); ioctl(sounddev, SNDCTL_DSP_SETFMT, &bits);