diff options
| author | TraceBullet <tracebullet@gmail.com> | 2018-01-12 22:37:04 -0500 |
|---|---|---|
| committer | TraceBullet <tracebullet@gmail.com> | 2018-01-26 10:47:19 -0500 |
| commit | ab6f9323471d75b9d0cca191e7199b1a3b1ae137 (patch) | |
| tree | 46c9f26158c695878764b4d84fc2d9b014ff9d9d /Source/Core/VideoCommon/RenderBase.cpp | |
| parent | 955214c6b6549d0060908e4e9ef4eed60becd69c (diff) | |
Fix Auto-Adjust Window Size option making the window too large
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index e9b0c3dff1..608d215c48 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -523,10 +523,6 @@ void Renderer::UpdateDrawRectangle() void Renderer::SetWindowSize(int width, int height) { - // Scale the window size by the EFB scale. - if (g_ActiveConfig.iEFBScale != EFB_SCALE_AUTO_INTEGRAL) - std::tie(width, height) = CalculateTargetScale(width, height); - std::tie(width, height) = CalculateOutputDimensions(width, height); // Track the last values of width/height to avoid sending a window resize event every frame. @@ -643,11 +639,12 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const if (xfb_entry && xfb_entry->id != m_last_xfb_id) { + const TextureConfig& texture_config = xfb_entry->texture->GetConfig(); m_last_xfb_texture = xfb_entry->texture.get(); m_last_xfb_id = xfb_entry->id; m_last_xfb_ticks = ticks; - auto xfb_rect = xfb_entry->texture->GetConfig().GetRect(); + auto xfb_rect = texture_config.GetRect(); xfb_rect.right -= EFBToScaledX(fbStride - fbWidth); m_last_xfb_region = xfb_rect; @@ -655,6 +652,10 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const // TODO: merge more generic parts into VideoCommon g_renderer->SwapImpl(xfb_entry->texture.get(), xfb_rect, ticks, xfb_entry->gamma); + // Update the window size based on the frame that was just rendered. + // Due to depending on guest state, we need to call this every frame. + SetWindowSize(texture_config.width, texture_config.height); + m_fps_counter.Update(); if (IsFrameDumping()) |
