From 820bd2545c90a65aa031273e7d1bbc72396a5fe2 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Tue, 3 Dec 2019 09:44:42 +0000 Subject: [PATCH] SW: Get widescreen aspect working git-svn-id: https://svn.eduke32.com/eduke32@8346 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/sw/src/draw.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index 84934cff7..8a245cea3 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -2198,6 +2198,8 @@ drawscreen(PLAYERp pp) static short lv_sectnum = -1; static int lv_x, lv_y, lv_z; + int const viewingRange = viewingrange; + if (HelpInputMode) { renderFlushPerms(); @@ -2363,6 +2365,12 @@ drawscreen(PLAYERp pp) thoriz = min(thoriz, PLAYER_HORIZ_MAX); } + if (r_usenewaspect) + { + newaspect_enable = 1; + videoSetCorrectedAspect(); + } + if (FAF_DebugView) videoClearViewableArea(255L); @@ -2387,6 +2395,12 @@ drawscreen(PLAYERp pp) post_analyzesprites(); renderDrawMasks(); + if (r_usenewaspect) + { + newaspect_enable = 0; + renderSetAspect(viewingRange, tabledivide32_noinline(65536 * ydim * 8, xdim * 5)); + } + UpdatePanel(); #define SLIME 2305