X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfxvideo%2Fdraw_pl.c;h=dffd52b4d03895f5fe9fe4176739221483b24e4c;hp=22351a44333bef32cbefd626961f3a33126ae917;hb=59d15d23d97d4347d8046057013f8979db0914f0;hpb=1f219c7b8a6f2b7a70f595ccdfe419ea034c9411 diff --git a/plugins/dfxvideo/draw_pl.c b/plugins/dfxvideo/draw_pl.c index 22351a44..dffd52b4 100644 --- a/plugins/dfxvideo/draw_pl.c +++ b/plugins/dfxvideo/draw_pl.c @@ -32,13 +32,7 @@ static void blit(void *vout_buf) if (w <= 0) return; -#ifndef MAEMO - pitch *= PSXDisplay.RGB24 ? 3 : 2; -#else - // n900 doesn't do rgb24 for some reason - pitch *= 2; - #define bgr888_to_rgb888 bgr888_to_rgb565 -#endif + pitch *= (PSXDisplay.RGB24 && !rcbs->only_16bpp) ? 3 : 2; // account for centering h -= PreviousPSXDisplay.Range.y0; @@ -47,9 +41,19 @@ static void blit(void *vout_buf) if (PSXDisplay.RGB24) { - for (; h-- > 0; dest += pitch, srcs += 1024) + if (!rcbs->only_16bpp) + { + for (; h-- > 0; dest += pitch, srcs += 1024) + { + bgr888_to_rgb888(dest, srcs, w * 3); + } + } + else { - bgr888_to_rgb888(dest, srcs, w * 3); + for (; h-- > 0; dest += pitch, srcs += 1024) + { + bgr888_to_rgb565(dest, srcs, w * 3); + } } } else