summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/Render.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2014-12-24 23:54:43 +0100
committerJules Blok <jules.blok@gmail.com>2014-12-24 23:55:04 +0100
commit1bbb323e975586fdeb7e50bb54afbfa8dc5a368f (patch)
tree97a4c6f828931dfdce91c923cead6a75f9e6fee1 /Source/Core/VideoBackends/D3D/Render.cpp
parent9590ea0cf6e8bc52ddec6c47d485db05645bab7a (diff)
D3D: Remove obsolete Real XFB codepath.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/Render.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/Render.cpp43
1 files changed, 18 insertions, 25 deletions
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp
index a3baf4a1a7..f9b5e4e141 100644
--- a/Source/Core/VideoBackends/D3D/Render.cpp
+++ b/Source/Core/VideoBackends/D3D/Render.cpp
@@ -739,31 +739,24 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
TargetRectangle drawRc;
- if (g_ActiveConfig.bUseRealXFB)
- {
- drawRc = targetRc;
- }
- else
- {
- // use virtual xfb with offset
- int xfbHeight = xfbSource->srcHeight;
- int xfbWidth = xfbSource->srcWidth;
- int hOffset = ((s32)xfbSource->srcAddr - (s32)xfbAddr) / ((s32)fbStride * 2);
-
- drawRc.top = targetRc.bottom - (hOffset + xfbHeight) * targetRc.GetHeight() / fbHeight;
- drawRc.bottom = targetRc.bottom - hOffset * targetRc.GetHeight() / fbHeight;
- drawRc.left = targetRc.left + (targetRc.GetWidth() - xfbWidth * targetRc.GetWidth() / fbStride) / 2;
- drawRc.right = targetRc.left + (targetRc.GetWidth() + xfbWidth * targetRc.GetWidth() / fbStride) / 2;
-
- // The following code disables auto stretch. Kept for reference.
- // scale draw area for a 1 to 1 pixel mapping with the draw target
- //float vScale = (float)fbHeight / (float)s_backbuffer_height;
- //float hScale = (float)fbWidth / (float)s_backbuffer_width;
- //drawRc.top *= vScale;
- //drawRc.bottom *= vScale;
- //drawRc.left *= hScale;
- //drawRc.right *= hScale;
- }
+ // use virtual xfb with offset
+ int xfbHeight = xfbSource->srcHeight;
+ int xfbWidth = xfbSource->srcWidth;
+ int hOffset = ((s32)xfbSource->srcAddr - (s32)xfbAddr) / ((s32)fbStride * 2);
+
+ drawRc.top = targetRc.bottom - (hOffset + xfbHeight) * targetRc.GetHeight() / fbHeight;
+ drawRc.bottom = targetRc.bottom - hOffset * targetRc.GetHeight() / fbHeight;
+ drawRc.left = targetRc.left + (targetRc.GetWidth() - xfbWidth * targetRc.GetWidth() / fbStride) / 2;
+ drawRc.right = targetRc.left + (targetRc.GetWidth() + xfbWidth * targetRc.GetWidth() / fbStride) / 2;
+
+ // The following code disables auto stretch. Kept for reference.
+ // scale draw area for a 1 to 1 pixel mapping with the draw target
+ //float vScale = (float)fbHeight / (float)s_backbuffer_height;
+ //float hScale = (float)fbWidth / (float)s_backbuffer_width;
+ //drawRc.top *= vScale;
+ //drawRc.bottom *= vScale;
+ //drawRc.left *= hScale;
+ //drawRc.right *= hScale;
TargetRectangle sourceRc = xfbSource->sourceRc;
sourceRc.right -= fbStride - fbWidth;