mirror of https://github.com/PCSX2/pcsx2.git
GSdx:
Added a somewhat more accurate upscale option via GSdx.ini. Not tested much! :p git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2055 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e4330ee0ee
commit
fb2169f64d
|
@ -34,6 +34,11 @@ GSRenderer::GSRenderer()
|
||||||
m_filter = theApp.GetConfig("filter", 1);
|
m_filter = theApp.GetConfig("filter", 1);
|
||||||
m_vsync = !!theApp.GetConfig("vsync", 0);
|
m_vsync = !!theApp.GetConfig("vsync", 0);
|
||||||
m_nativeres = !!theApp.GetConfig("nativeres", 0);
|
m_nativeres = !!theApp.GetConfig("nativeres", 0);
|
||||||
|
|
||||||
|
m_accurateScaleMulti = theApp.GetConfig("accurateScaleMulti", 1);
|
||||||
|
if(m_nativeres) m_accurateScaleMulti = 1;
|
||||||
|
else if (m_accurateScaleMulti > 4) m_accurateScaleMulti = 1;
|
||||||
|
|
||||||
m_aa1 = !!theApp.GetConfig("aa1", 0);
|
m_aa1 = !!theApp.GetConfig("aa1", 0);
|
||||||
m_blur = !!theApp.GetConfig("blur", 0);
|
m_blur = !!theApp.GetConfig("blur", 0);
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ protected:
|
||||||
int m_interlace;
|
int m_interlace;
|
||||||
int m_aspectratio;
|
int m_aspectratio;
|
||||||
int m_filter;
|
int m_filter;
|
||||||
|
int m_accurateScaleMulti;
|
||||||
bool m_vsync;
|
bool m_vsync;
|
||||||
bool m_nativeres;
|
bool m_nativeres;
|
||||||
bool m_aa1;
|
bool m_aa1;
|
||||||
|
@ -88,6 +89,10 @@ public:
|
||||||
{
|
{
|
||||||
return !m_nativeres && m_regs->PMODE.EN != 0; // upscale ratio depends on the display size, with no output it may not be set correctly (ps2 logo to game transition)
|
return !m_nativeres && m_regs->PMODE.EN != 0; // upscale ratio depends on the display size, with no output it may not be set correctly (ps2 logo to game transition)
|
||||||
}
|
}
|
||||||
|
virtual int accurateScaleMulti()
|
||||||
|
{
|
||||||
|
return m_accurateScaleMulti;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO : Implement proper locking here *if needed* (not sure yet if it is) --air
|
// TODO : Implement proper locking here *if needed* (not sure yet if it is) --air
|
||||||
uint8* GetTextureBufferLock() { return m_tex_buff; }
|
uint8* GetTextureBufferLock() { return m_tex_buff; }
|
||||||
|
|
|
@ -32,6 +32,7 @@ class GSRendererHW : public GSRendererT<Vertex>
|
||||||
{
|
{
|
||||||
int m_width;
|
int m_width;
|
||||||
int m_height;
|
int m_height;
|
||||||
|
int m_accurateScaleMulti;
|
||||||
int m_skip;
|
int m_skip;
|
||||||
bool m_reset;
|
bool m_reset;
|
||||||
|
|
||||||
|
@ -709,6 +710,7 @@ public:
|
||||||
, m_tc(tc)
|
, m_tc(tc)
|
||||||
, m_width(1024)
|
, m_width(1024)
|
||||||
, m_height(1024)
|
, m_height(1024)
|
||||||
|
, m_accurateScaleMulti(1)
|
||||||
, m_skip(0)
|
, m_skip(0)
|
||||||
, m_reset(false)
|
, m_reset(false)
|
||||||
{
|
{
|
||||||
|
@ -716,6 +718,13 @@ public:
|
||||||
{
|
{
|
||||||
m_width = theApp.GetConfig("resx", m_width);
|
m_width = theApp.GetConfig("resx", m_width);
|
||||||
m_height = theApp.GetConfig("resy", m_height);
|
m_height = theApp.GetConfig("resy", m_height);
|
||||||
|
m_accurateScaleMulti = theApp.GetConfig("accurateScaleMulti", m_accurateScaleMulti);
|
||||||
|
if (m_accurateScaleMulti > 4) m_accurateScaleMulti = 1; //use the normal upscale math
|
||||||
|
if (m_accurateScaleMulti > 1)
|
||||||
|
{
|
||||||
|
m_width = 1024 * m_accurateScaleMulti;
|
||||||
|
m_height = 1024 * m_accurateScaleMulti;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,6 +172,14 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
||||||
|
|
||||||
if(m_renderer->CanUpscale())
|
if(m_renderer->CanUpscale())
|
||||||
{
|
{
|
||||||
|
int multiplier = m_renderer->accurateScaleMulti();
|
||||||
|
if (multiplier > 1) //it's limited to a maximum of 4 on reading the config
|
||||||
|
{
|
||||||
|
dst->m_texture->SetScale(GSVector2((float)multiplier, (float)multiplier));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
GSVector4i fr = m_renderer->GetFrameRect();
|
GSVector4i fr = m_renderer->GetFrameRect();
|
||||||
|
|
||||||
int ww = (int)(fr.left + dst->m_TEX0.TBW * 64);
|
int ww = (int)(fr.left + dst->m_TEX0.TBW * 64);
|
||||||
|
@ -192,6 +200,7 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
||||||
dst->m_texture->SetScale(GSVector2((float)w / ww, (float)h / hh));
|
dst->m_texture->SetScale(GSVector2((float)w / ww, (float)h / hh));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(used)
|
if(used)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue