From 47f69f694a0f14d90a25044c6f40ef61d4d1a102 Mon Sep 17 00:00:00 2001 From: Akash Date: Wed, 27 Jul 2016 20:53:17 +0530 Subject: [PATCH] GSDX-TextureCache: Port Half pixel offset hack for custom resolutions --- plugins/GSdx/GSTextureCache.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 6e3c521a0d..355b2642c1 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -1329,6 +1329,14 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con { switch(m_renderer->GetUpscaleMultiplier()) { + case 0: //Custom Resolution + { + const float offset = 0.2f; + modx = dst->m_texture->GetScale().x + offset; + mody = dst->m_texture->GetScale().y + offset; + dst->m_texture->LikelyOffset = true; + break; + } case 2: modx = 2.2f; mody = 2.2f; dst->m_texture->LikelyOffset = true; break; case 3: modx = 3.1f; mody = 3.1f; dst->m_texture->LikelyOffset = true; break; case 4: modx = 4.2f; mody = 4.2f; dst->m_texture->LikelyOffset = true; break;