X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfxvideo%2Fdraw_fb.c;h=a3f50e82f6bd1c2d397fdb26ebcb2b8585e30181;hp=afe1d2089518887e24cad00f9ed9be1fc3b45e8d;hb=4c08b9e7dd350a48fc3e0515913d6ccc8b15e5ae;hpb=a96a5eb2d6a6720cc7bba6a30d1c25473f345a89 diff --git a/plugins/dfxvideo/draw_fb.c b/plugins/dfxvideo/draw_fb.c index afe1d208..a3f50e82 100644 --- a/plugins/dfxvideo/draw_fb.c +++ b/plugins/dfxvideo/draw_fb.c @@ -9,8 +9,9 @@ #include "gpu.h" -#include "plugin_lib.h" -#include "pcnt.h" +#include "../../frontend/plugin_lib.h" +#include "../../frontend/arm_utils.h" +#include "../../frontend/pcnt.h" // misc globals long lLowerpart; @@ -18,16 +19,9 @@ 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 px = PSXDisplay.DisplayPosition.x & ~1; // XXX: align needed by bgr*_to_... int py = PSXDisplay.DisplayPosition.y; int w = PreviousPSXDisplay.Range.x1; int h = PreviousPSXDisplay.DisplayMode.y; @@ -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; @@ -103,4 +101,3 @@ void CloseDisplay(void) { pl_fbdev_close(); } -