summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/RenderBase.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2010-11-18 03:50:50 +0000
committerJordan Woyak <jordan.woyak@gmail.com>2010-11-18 03:50:50 +0000
commit0816fa2629b38c783a88ef65c23d356147724826 (patch)
tree3736d2760afc2acc3f70ce621054a0dcb785eec9 /Source/Core/VideoCommon/Src/RenderBase.cpp
parentbcad22f266a3d104cdbaa497a6a2a3f2d4826842 (diff)
Fixed RealXFB being enabled when XFB box is unchecked. Moved some shared code into VideoCommon. Renamed EFBCopyDisable setting to EFBCopy"Enable" in the code and inifile. Fix DX11 settings not loading. Fixed Issue 3378.(graphics settings dialog displaying gameini settings in game)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6435 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/RenderBase.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/RenderBase.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Src/RenderBase.cpp b/Source/Core/VideoCommon/Src/RenderBase.cpp
index d4b90bc802..8aece882e4 100644
--- a/Source/Core/VideoCommon/Src/RenderBase.cpp
+++ b/Source/Core/VideoCommon/Src/RenderBase.cpp
@@ -209,8 +209,8 @@ void Renderer::DrawDebugText()
break;
}
- const char* const efbcopy_text = g_ActiveConfig.bEFBCopyDisable ? "Disabled" :
- g_ActiveConfig.bCopyEFBToTexture ? "to Texture" : "to RAM";
+ const char* const efbcopy_text = g_ActiveConfig.bEFBCopyEnable ?
+ (g_ActiveConfig.bCopyEFBToTexture ? "to Texture" : "to RAM") : "Disabled";
// The rows
const std::string lines[] =
@@ -258,6 +258,29 @@ void Renderer::DrawDebugText()
}
}
+void Renderer::CalculateXYScale(const TargetRectangle& dst_rect)
+{
+ if (g_ActiveConfig.bUseXFB && g_ActiveConfig.bUseRealXFB)
+ {
+ xScale = 1.0f;
+ yScale = 1.0f;
+ }
+ else
+ {
+ if (g_ActiveConfig.b3DVision)
+ {
+ // This works, yet the version in the else doesn't. No idea why.
+ xScale = (float)s_backbuffer_width / (float)s_XFB_width;
+ yScale = (float)s_backbuffer_height / (float)s_XFB_height;
+ }
+ else
+ {
+ xScale = (float)(dst_rect.right - dst_rect.left) / (float)s_XFB_width;
+ yScale = (float)(dst_rect.bottom - dst_rect.top) / (float)s_XFB_height;
+ }
+ }
+}
+
void UpdateViewport()
{
g_renderer->UpdateViewport();