X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Flibretro.c;h=9bbea5ba86193eaea6c23b97376bca3305962e04;hp=a0b9f4638b62afe8f16d3b69ecd06870690b8527;hb=9c59f1201acf724294f4517d96d0698f19ffa94c;hpb=07c13dfd11cbd45e96a5c21cd88ccd44601678ea diff --git a/frontend/libretro.c b/frontend/libretro.c index a0b9f463..9bbea5ba 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -49,11 +49,11 @@ static void *vout_set_mode(int w, int h, int bpp) } /* FIXME: either teach PCSX to blit to RGB1555 or RetroArch to support RGB565 */ -static void convert(void *buf, size_t size) +static void convert(void *buf, size_t bytes) { unsigned int i, v, *p = buf; - for (i = 0; i < size / 2; i++) { + for (i = 0; i < bytes / 4; i++) { v = p[i]; p[i] = (v & 0x001f001f) | ((v >> 1) & 0x7fe07fe0); }