summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/BPStructs.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2017-08-12 23:10:21 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2017-11-17 22:11:30 -0600
commit7f0834c91992c3726f1ba36f32f85b97aaa1ece2 (patch)
tree85bbcccc659c95ab95a16df002413efb45e5445e /Source/Core/VideoCommon/BPStructs.cpp
parenta71bc9ebbf34ba815da8f38b55933abc25f32379 (diff)
Add 'immediate xfb' which reduces xfb latency at the cost of graphical errors
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/BPStructs.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp
index 183f7d4f20..22e808fe90 100644
--- a/Source/Core/VideoCommon/BPStructs.cpp
+++ b/Source/Core/VideoCommon/BPStructs.cpp
@@ -12,6 +12,7 @@
#include "Common/StringUtil.h"
#include "Common/Thread.h"
#include "Core/ConfigManager.h"
+#include "Core/CoreTiming.h"
#include "Core/FifoPlayer/FifoPlayer.h"
#include "Core/FifoPlayer/FifoRecorder.h"
#include "Core/HW/Memmap.h"
@@ -266,9 +267,17 @@ static void BPWritten(const BPCmd& bp)
// This stays in to signal end of a "frame"
g_renderer->RenderToXFB(destAddr, srcRect, destStride, height, s_gammaLUT[PE_copy.gamma]);
- if (FifoPlayer::GetInstance().IsRunningWithFakeVideoInterfaceUpdates())
+ if (g_ActiveConfig.bImmediateXFB)
{
- VideoInterface::FakeVIUpdate(destAddr, srcRect.GetWidth(), height);
+ // below div two to convert from bytes to pixels - it expects width, not stride
+ g_renderer->Swap(destAddr, destStride / 2, destStride / 2, height, false, srcRect, CoreTiming::GetTicks(), s_gammaLUT[PE_copy.gamma]);
+ }
+ else
+ {
+ if (FifoPlayer::GetInstance().IsRunningWithFakeVideoInterfaceUpdates())
+ {
+ VideoInterface::FakeVIUpdate(destAddr, srcRect.GetWidth(), height);
+ }
}
}