From a9d14fc03d83cbd1fa7ddf235cbf286510e7dc49 Mon Sep 17 00:00:00 2001 From: Dave Milici Date: Tue, 4 May 2021 09:55:48 -0700 Subject: [PATCH] Relocate stereo conditional for cockpit views into select_cockpit(). Avoids switching cockpit views to CM_LETTERBOX when player dies or level ends which stereo viewport is active, as well as other calls to select_cockpit(). --- similar/main/game.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/similar/main/game.cpp b/similar/main/game.cpp index 9202a8cd3..25d656368 100644 --- a/similar/main/game.cpp +++ b/similar/main/game.cpp @@ -252,10 +252,6 @@ void init_cockpit() } #endif - // Hack to keep stereo formats remaining fullscreen - if (VR_stereo && PlayerCfg.CockpitMode[1] != CM_FULL_SCREEN) - PlayerCfg.CockpitMode[1] = CM_FULL_SCREEN; - gr_set_default_canvas(); switch( PlayerCfg.CockpitMode[1] ) { @@ -338,6 +334,10 @@ void init_cockpit() //selects a given cockpit (or lack of one). See types in game.h void select_cockpit(cockpit_mode_t mode) { + // skip switching cockpit views while stereo viewport active + if (VR_stereo && mode != CM_FULL_SCREEN) + return; + if (mode != PlayerCfg.CockpitMode[1]) { //new mode PlayerCfg.CockpitMode[1]=mode; init_cockpit();