aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfxvideo
diff options
context:
space:
mode:
authornotaz2011-02-03 23:37:20 +0200
committernotaz2011-02-03 23:37:20 +0200
commitf3a63e25fac571e222b969f0d16c542061190797 (patch)
treed970d76e26d3b3e966b0d79debb47bf23f3e413a /plugins/dfxvideo
parente0c692d9417fdea51a1deebda1048d1a91f1270f (diff)
downloadpcsx_rearmed-f3a63e25fac571e222b969f0d16c542061190797.tar.gz
pcsx_rearmed-f3a63e25fac571e222b969f0d16c542061190797.tar.bz2
pcsx_rearmed-f3a63e25fac571e222b969f0d16c542061190797.zip
dfxvideo: add bgr888->rgb565 converter for maemo port
Diffstat (limited to 'plugins/dfxvideo')
-rw-r--r--plugins/dfxvideo/draw_fb.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/dfxvideo/draw_fb.c b/plugins/dfxvideo/draw_fb.c
index afe1d20..dbf0fc8 100644
--- a/plugins/dfxvideo/draw_fb.c
+++ b/plugins/dfxvideo/draw_fb.c
@@ -10,6 +10,7 @@
#include "gpu.h"
#include "plugin_lib.h"
+#include "arm_utils.h"
#include "pcnt.h"
// misc globals
@@ -18,15 +19,8 @@ BOOL bCheckMask = FALSE;
unsigned short sSetMask;
unsigned long lSetMask;
-#ifndef __arm__
-#define bgr555_to_rgb565 memcpy
-#define bgr888_to_rgb888 memcpy
-#endif
-
static void blit(void)
{
- extern void bgr555_to_rgb565(void *dst, void *src, int bytes);
- extern void bgr888_to_rgb888(void *dst, void *src, int bytes);
int px = PSXDisplay.DisplayPosition.x & ~3; // XXX: align needed by bgr*_to_...
int py = PSXDisplay.DisplayPosition.y;
int w = PreviousPSXDisplay.Range.x1;
@@ -38,9 +32,13 @@ static void blit(void)
if (w <= 0)
return;
- // TODO: clear border if centering?
-
+#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
// account for centering
h -= PreviousPSXDisplay.Range.y0;