From 284be96cd58a231785f434e7fcff956184d7192f Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Wed, 29 Oct 2014 15:42:37 +0100 Subject: [PATCH] OGL: Recreate the framebuffers when the stereo setting changes. --- Source/Core/VideoBackends/OGL/Render.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 802a1b1f96..1a0b7e5708 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -89,6 +89,8 @@ static RasterFont* s_pfont = nullptr; static int s_MSAASamples = 1; static int s_LastMultisampleMode = 0; +static bool s_LastStereo = false; + static u32 s_blendMode; static bool s_vsync; @@ -591,6 +593,7 @@ Renderer::Renderer() s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode; s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode); ApplySSAASettings(); + s_LastStereo = g_ActiveConfig.bStereo; // Decide framebuffer size s_backbuffer_width = (int)GLInterface->GetBackBufferWidth(); @@ -1690,15 +1693,16 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co s_LastEFBScale = g_ActiveConfig.iEFBScale; } - if (xfbchanged || WindowResized || (s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode)) + if (xfbchanged || WindowResized || (s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode) || (s_LastStereo != g_ActiveConfig.bStereo)) { UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height); - if (CalculateTargetSize(s_backbuffer_width, s_backbuffer_height) || s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode) + if (CalculateTargetSize(s_backbuffer_width, s_backbuffer_height) || s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode || s_LastStereo != g_ActiveConfig.bStereo) { s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode; s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode); ApplySSAASettings(); + s_LastStereo = g_ActiveConfig.bStereo; delete g_framebuffer_manager; g_framebuffer_manager = new FramebufferManager(s_target_width, s_target_height,