aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfxvideo/draw_pl.c
diff options
context:
space:
mode:
authornotaz2012-04-29 19:18:49 +0300
committernotaz2012-04-29 19:32:08 +0300
commit4ea7de6a1495abfbc49c54fd2a90e902fdfa13d9 (patch)
treef062e83f543a583e75ca58e88511f79057464a93 /plugins/dfxvideo/draw_pl.c
parentb07c18e8645a17be916266820ae564e0d320cc1a (diff)
downloadpcsx_rearmed-4ea7de6a1495abfbc49c54fd2a90e902fdfa13d9.tar.gz
pcsx_rearmed-4ea7de6a1495abfbc49c54fd2a90e902fdfa13d9.tar.bz2
pcsx_rearmed-4ea7de6a1495abfbc49c54fd2a90e902fdfa13d9.zip
gpu plugins: always support 16bpp blit
use this for generic sdl and maemo
Diffstat (limited to 'plugins/dfxvideo/draw_pl.c')
-rw-r--r--plugins/dfxvideo/draw_pl.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/plugins/dfxvideo/draw_pl.c b/plugins/dfxvideo/draw_pl.c
index 22351a4..dffd52b 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