minor adjustments
[fceu.git] / drivers / gp2x / minimal.c
index 9716e5b..e11643e 100644 (file)
@@ -68,7 +68,8 @@ void gp2x_video_flip(void)
 \r
        // since we are using the mmu hack, we must flush the cache first\r
        // (the params are most likely wrong, but they seem to work somehow)\r
-       flushcache(addr, addr + 320*240*2, 0);\r
+       //flushcache(addr, addr + 320*240*2, 0);\r
+       flushcache(gp2x_screen, (char *)gp2x_screen + 320*240*2, 0);\r
 \r
        lsw = (unsigned short) addr;\r
        msw = (unsigned short)(addr >> 16);\r
@@ -219,7 +220,10 @@ void gp2x_start_sound(int rate, int bits, int stereo)
        if (sounddev > 0) close(sounddev);\r
        sounddev = open("/dev/dsp", O_WRONLY|O_ASYNC);\r
        if (sounddev == -1)\r
+       {\r
                printf("open(\"/dev/dsp\") failed with %i\n", errno);\r
+               return;\r
+       }\r
 \r
        ioctl(sounddev, SNDCTL_DSP_SPEED,  &rate);\r
        ioctl(sounddev, SNDCTL_DSP_SETFMT, &bits);\r