summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderBase.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2019-08-17 14:40:58 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2020-10-03 17:10:35 -0500
commitfd3af4c5d32a34b27c45b478c74fa1127b6438b9 (patch)
treedf55a2548a01e0cd0578abb41f2c9ad78d1db544 /Source/Core/VideoCommon/RenderBase.cpp
parent8a1539f9487cff0b5785e2d341663e4d7136e2a3 (diff)
InputCommon: Introducing the "Dynamic Input Texture". Configuration links an emulated input action to an image based on what host key is defined for that emulated input. Specific regions are called out in configuration that mark where to replace an input button with a host key image.
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index a60f9b9f91..4777314194 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -1138,6 +1138,11 @@ void Renderer::EndUIFrame()
BeginImGuiFrame();
}
+void Renderer::ForceReloadTextures()
+{
+ m_force_reload_textures.Set();
+}
+
// Heuristic to detect if a GameCube game is in 16:9 anamorphic widescreen mode.
void Renderer::UpdateWidescreenHeuristic()
{
@@ -1302,9 +1307,17 @@ void Renderer::Swap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, u6
// state changes the specialized shader will not take over.
g_vertex_manager->InvalidatePipelineObject();
- // Flush any outstanding EFB copies to RAM, in case the game is running at an uncapped frame
- // rate and not waiting for vblank. Otherwise, we'd end up with a huge list of pending copies.
- g_texture_cache->FlushEFBCopies();
+ if (m_force_reload_textures.TestAndClear())
+ {
+ g_texture_cache->ForceReload();
+ }
+ else
+ {
+ // Flush any outstanding EFB copies to RAM, in case the game is running at an uncapped frame
+ // rate and not waiting for vblank. Otherwise, we'd end up with a huge list of pending
+ // copies.
+ g_texture_cache->FlushEFBCopies();
+ }
if (!is_duplicate_frame)
{