From 4b1d26890883322366d5354df485f666b2019acf Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 22 Feb 2019 18:35:37 +0000 Subject: [PATCH] Use existing viewingrange and yxaspect for showview so it matches that of the main view This fixes fov when using showview in EVENT_DISPLAYROOMS to do layered rendering, but it might not be right for uses of showview that simply display picture-in-picture stuff on screen. git-svn-id: https://svn.eduke32.com/eduke32@7350 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/gameexec.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index 76cabb631..622dfff93 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -1205,13 +1205,11 @@ LUNATIC_EXTERN void G_ShowView(vec3_t vec, fix16_t a, fix16_t horiz, int sect, i horiz = fix16_clamp(horiz, F16(HORIZ_MIN), F16(HORIZ_MAX)); - int const onewaspect = newaspect_enable; - newaspect_enable = r_usenewaspect; - setaspect_new_use_dimen = 1; - videoSetViewableArea(x1,y1,x2,y2); - setaspect_new_use_dimen = 0; - newaspect_enable = onewaspect; + int const viewingRange = viewingrange; + int const yxAspect = yxaspect; + videoSetViewableArea(x1,y1,x2,y2); + renderSetAspect(viewingRange, yxAspect); int const smoothratio = calc_smoothratio(totalclock, ototalclock); G_DoInterpolations(smoothratio); G_HandleMirror(vec.x, vec.y, vec.z, a, horiz, smoothratio); @@ -1229,6 +1227,7 @@ LUNATIC_EXTERN void G_ShowView(vec3_t vec, fix16_t a, fix16_t horiz, int sect, i renderDrawMasks(); G_RestoreInterpolations(); G_UpdateScreenArea(); + renderSetAspect(viewingRange, yxAspect); } void Screen_Play(void)