summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderBase.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2017-07-02 21:24:20 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2017-11-17 22:11:29 -0600
commitb285188de1a38565b9718bdac7fe698ee870d914 (patch)
tree0eaaf2baf9ed5bd32c92afbcf4562842fbba0eb4 /Source/Core/VideoCommon/RenderBase.cpp
parent5a372020ea989abb5dfaf10040d6e3fbd90c8001 (diff)
Video Backends: Implement vertical scaling for xfb copies. This fixes the
display of PAL games that run in 50hz mode.
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index 28e607f8cb..168aece684 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -668,15 +668,16 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const
// Get the current XFB from texture cache
auto* xfb_entry = g_texture_cache->GetTexture(xfbAddr, fbWidth, fbHeight, TextureFormat::XFB,
force_safe_texture_cache_hash);
-
- // TODO, check if xfb_entry is a duplicate of the previous frame and skip SwapImpl
- m_previous_xfb_texture = xfb_entry->texture.get();
+ if (xfb_entry)
+ {
+ // TODO, check if xfb_entry is a duplicate of the previous frame and skip SwapImpl
m_last_xfb_texture = xfb_entry->texture.get();
- // TODO: merge more generic parts into VideoCommon
- g_renderer->SwapImpl(xfb_entry->texture.get(), rc, ticks, Gamma);
+ // TODO: merge more generic parts into VideoCommon
+ g_renderer->SwapImpl(xfb_entry->texture.get(), rc, ticks, Gamma);
+ }
}
if (m_xfb_written)