X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfxvideo%2Fdraw_fb.c;fp=plugins%2Fdfxvideo%2Fdraw_fb.c;h=b39e2ee6ab1592ea7c9135fe3c0c28d49c8a9bcd;hp=f3d0cf2e1d8c2ac03c420b1091b7ad45e0a2b328;hb=d352cde27e89b1be21bf8f88c3ca79e0eb497165;hpb=5bf843dc7ca2eb95430607b49c0dde6798950317 diff --git a/plugins/dfxvideo/draw_fb.c b/plugins/dfxvideo/draw_fb.c index f3d0cf2e..b39e2ee6 100644 --- a/plugins/dfxvideo/draw_fb.c +++ b/plugins/dfxvideo/draw_fb.c @@ -48,7 +48,7 @@ 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 x = PSXDisplay.DisplayPosition.x; + int x = PSXDisplay.DisplayPosition.x & ~3; // XXX: align needed by bgr*_to_... int y = PSXDisplay.DisplayPosition.y; int w = PreviousPSXDisplay.Range.x1; int h = PreviousPSXDisplay.DisplayMode.y; @@ -93,6 +93,8 @@ void DoBufferSwap(void) if (PSXDisplay.DisplayMode.x == 0 || PSXDisplay.DisplayMode.y == 0) return; + /* careful if rearranging this code, we try to set mode and flip + * to get the hardware apply both changes at the same time */ if (PSXDisplay.DisplayMode.x != fbw || PSXDisplay.DisplayMode.y != fbh || PSXDisplay.RGB24 != fb24bpp) { fbw = PSXDisplay.DisplayMode.x;