From 3f32ccada6cf3533ab1f4aeb4a66df9cdc37bd2b Mon Sep 17 00:00:00 2001 From: Marisa Heit Date: Tue, 1 Nov 2016 22:54:27 -0500 Subject: [PATCH 1/2] Zero In2D before calling Flip() - Fixes an assert when resizing the window in windowed mode. Flip() can call V_OutputResized() in windowed mode. --- src/win32/fb_d3d9.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index 06bfa0569..8bb680dbd 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -1092,6 +1092,7 @@ void D3DFB::Update () DrawRateStuff(); DrawPackedTextures(d3d_showpacks); EndBatch(); // Make sure all batched primitives are drawn. + In2D = 0; Flip(); } In2D = 0; From f8641c0ffb65402598bd7c51906cba3e2b6f03dc Mon Sep 17 00:00:00 2001 From: Marisa Heit Date: Wed, 2 Nov 2016 00:07:57 -0500 Subject: [PATCH 2/2] Fixed: MaxVisForFloor was broken by the switch to floats - TODO: See if these visibility limits are even needed anymore. --- src/r_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_main.cpp b/src/r_main.cpp index 4252f4155..c69c22c7b 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -355,7 +355,7 @@ void R_SWRSetWindow(int windowSize, int fullWidth, int fullHeight, int stHeight, MaxVisForWall = (InvZtoScale * (SCREENWIDTH*r_Yaspect) / (viewwidth*SCREENHEIGHT * FocalTangent)); MaxVisForWall = 32767.0 / MaxVisForWall; - MaxVisForFloor = 32767.0 / (viewheight * FocalLengthY / 160); + MaxVisForFloor = 32767.0 / (viewheight >> 2) * FocalLengthY / 160; // Reset r_*Visibility vars R_SetVisibility(R_GetVisibility());