From b93b7ec419464432e03dd91b5b6c61a984a38a4a Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 7 Nov 2018 19:00:24 +0100 Subject: Fix the widescreen hack for Wii games with 4:3 forced in game INI --- Source/Core/VideoCommon/RenderBase.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Source/Core/VideoCommon/RenderBase.cpp') diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 448b195a62..239dd9b04c 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -85,9 +85,6 @@ Renderer::Renderer(int backbuffer_width, int backbuffer_height) UpdateDrawRectangle(); CalculateTargetSize(); - if (SConfig::GetInstance().bWii) - m_aspect_wide = Config::Get(Config::SYSCONF_WIDESCREEN); - m_last_host_config_bits = ShaderHostConfig::GetCurrent().bits; m_last_efb_multisamples = g_ActiveConfig.iMultisamples; } @@ -639,9 +636,19 @@ void Renderer::RecordVideoMemory() void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const EFBRectangle& rc, u64 ticks) { - // Heuristic to detect if a GameCube game is in 16:9 anamorphic widescreen mode. - if (!SConfig::GetInstance().bWii) + const AspectMode suggested = g_ActiveConfig.suggested_aspect_mode; + if (suggested == AspectMode::Analog || suggested == AspectMode::AnalogWide) { + m_aspect_wide = suggested == AspectMode::AnalogWide; + } + else if (SConfig::GetInstance().bWii) + { + m_aspect_wide = Config::Get(Config::SYSCONF_WIDESCREEN); + } + else + { + // Heuristic to detect if a GameCube game is in 16:9 anamorphic widescreen mode. + size_t flush_count_4_3, flush_count_anamorphic; std::tie(flush_count_4_3, flush_count_anamorphic) = g_vertex_manager->ResetFlushAspectRatioCount(); -- cgit v1.2.3 From a42432cae4c9a61dad6b0f8681ae6fe1945994a0 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 7 Nov 2018 19:01:45 +0100 Subject: RenderBase: Set m_aspect_wide on start It doesn't feel great to let the value from a previous emulation session linger around considering that the GC aspect ratio heuristic can use the previous value of m_aspect_wide when calculating m_aspect_wide. --- Source/Core/VideoCommon/RenderBase.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/VideoCommon/RenderBase.cpp') diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 239dd9b04c..2e42ed984a 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -85,6 +85,8 @@ Renderer::Renderer(int backbuffer_width, int backbuffer_height) UpdateDrawRectangle(); CalculateTargetSize(); + m_aspect_wide = SConfig::GetInstance().bWii && Config::Get(Config::SYSCONF_WIDESCREEN); + m_last_host_config_bits = ShaderHostConfig::GetCurrent().bits; m_last_efb_multisamples = g_ActiveConfig.iMultisamples; } -- cgit v1.2.3