From 1a9b21c195b3b95fa5889f0b971e1ff0bb82bfd4 Mon Sep 17 00:00:00 2001 From: Sryder Date: Mon, 27 May 2019 22:03:17 +0100 Subject: [PATCH 1/2] Fix Post Processing in 64-bit Software 3P/4P Vid_BlitLinearScreen didn't make sure that it was actually meant to be copying the entire screen rows before doing it properly. --- src/v_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v_video.c b/src/v_video.c index 3dfea0418..a624878c6 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -292,7 +292,7 @@ void VID_BlitLinearScreen(const UINT8 *srcptr, UINT8 *destptr, INT32 width, INT3 #ifdef HAVE_VIDCOPY VID_BlitLinearScreen_ASM(srcptr,destptr,width,height,srcrowbytes,destrowbytes); #else - if (srcrowbytes == destrowbytes) + if ((srcrowbytes == destrowbytes) && (srcrowbytes == (size_t)width)) M_Memcpy(destptr, srcptr, srcrowbytes * height); else { From 01a0fb1c8f0e43712d4c5e21949c20589a89996a Mon Sep 17 00:00:00 2001 From: Sryder Date: Mon, 27 May 2019 22:59:58 +0100 Subject: [PATCH 2/2] Fix Heatwave Post-processing Effect in 3P/4P --- src/v_video.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/v_video.c b/src/v_video.c index a624878c6..9233eda42 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -2404,7 +2404,7 @@ INT32 V_ThinStringWidth(const char *string, INT32 option) boolean *heatshifter = NULL; INT32 lastheight = 0; -INT32 heatindex[2] = { 0, 0 }; +INT32 heatindex[MAXSPLITSCREENPLAYERS] = {0, 0, 0, 0}; // // V_DoPostProcessor @@ -2537,9 +2537,6 @@ Unoptimized version UINT8 *srcscr = screens[0]; INT32 y; - if (splitscreen > 1) // 3P/4P has trouble supporting this, anyone want to fix it? :p - return; - // Make sure table is built if (heatshifter == NULL || lastheight != viewheight) { @@ -2554,7 +2551,7 @@ Unoptimized version heatshifter[y] = true; } - heatindex[0] = heatindex[1] = 0; + heatindex[0] = heatindex[1] = heatindex[2] = heatindex[3] = 0; lastheight = viewheight; }