From d0761d00441fa62f1a1c25ae3145df8870244a82 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 14 Jan 2024 21:29:14 +0100 Subject: [PATCH] background for missing 4th player screen in 4 player splitscreen just like software does c: --- src/hardware/hw_main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 9ba76a32b..a0999bfd1 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -6177,6 +6177,20 @@ void HWR_RenderFrame(INT32 viewnumber, player_t *player, boolean skybox) gr_windowcenterx += gr_viewwidth; } + if (splitscreen == 2 && player == &players[displayplayers[2]]) + { + // V_DrawPatchFill, but for the fourth screen only + GLPatch_t *gpatch = W_CachePatchName("SRB2BACK", PU_CACHE); + INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy); + INT32 x, y, pw = SHORT(gpatch->width) * dupz, ph = SHORT(gpatch->height) * dupz; + + for (x = vid.width>>1; x < vid.width; x += pw) + { + for (y = vid.height>>1; y < vid.height; y += ph) + V_DrawScaledPatch(x, y, V_NOSCALESTART, gpatch); + } + } + // check for new console commands. NetUpdate();