aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfxvideo
diff options
context:
space:
mode:
authornotaz2010-12-11 19:50:25 +0200
committernotaz2010-12-14 15:25:05 +0200
commitd352cde27e89b1be21bf8f88c3ca79e0eb497165 (patch)
tree4dd77756eceeabd0532bd43b0c98c8f90d3db46f /plugins/dfxvideo
parent5bf843dc7ca2eb95430607b49c0dde6798950317 (diff)
downloadpcsx_rearmed-d352cde27e89b1be21bf8f88c3ca79e0eb497165.tar.gz
pcsx_rearmed-d352cde27e89b1be21bf8f88c3ca79e0eb497165.tar.bz2
pcsx_rearmed-d352cde27e89b1be21bf8f88c3ca79e0eb497165.zip
fix bgr2rgb16 and reduce mode change glitching
Diffstat (limited to 'plugins/dfxvideo')
-rw-r--r--plugins/dfxvideo/draw_fb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/dfxvideo/draw_fb.c b/plugins/dfxvideo/draw_fb.c
index f3d0cf2..b39e2ee 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;