mirror of https://github.com/PCSX2/pcsx2.git
gsdx: Consider horizontal offsets when merging output
Fixes games like Time Crisis 2/3, which use two half-width display rectangles placed side by side in split screen mode by using different DISPLAY.DX values.
This commit is contained in:
parent
203fb71851
commit
7b27be1306
|
@ -99,7 +99,7 @@ bool GSRenderer::Merge(int field)
|
||||||
GSVector4i fr[2];
|
GSVector4i fr[2];
|
||||||
GSVector4i dr[2];
|
GSVector4i dr[2];
|
||||||
|
|
||||||
int baseline = INT_MAX;
|
GSVector2i baseline = {INT_MAX, INT_MAX};
|
||||||
|
|
||||||
for(int i = 0; i < 2; i++)
|
for(int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,8 @@ bool GSRenderer::Merge(int field)
|
||||||
fr[i] = GetFrameRect(i);
|
fr[i] = GetFrameRect(i);
|
||||||
dr[i] = GetDisplayRect(i);
|
dr[i] = GetDisplayRect(i);
|
||||||
|
|
||||||
baseline = min(dr[i].top, baseline);
|
baseline.x = min(dr[i].left, baseline.x);
|
||||||
|
baseline.y = min(dr[i].top, baseline.y);
|
||||||
|
|
||||||
//printf("[%d]: %d %d %d %d, %d %d %d %d\n", i, fr[i].x,fr[i].y,fr[i].z,fr[i].w , dr[i].x,dr[i].y,dr[i].z,dr[i].w);
|
//printf("[%d]: %d %d %d %d, %d %d %d %d\n", i, fr[i].x,fr[i].y,fr[i].z,fr[i].w , dr[i].x,dr[i].y,dr[i].z,dr[i].w);
|
||||||
}
|
}
|
||||||
|
@ -222,9 +223,12 @@ bool GSRenderer::Merge(int field)
|
||||||
|
|
||||||
GSVector2 off(0, 0);
|
GSVector2 off(0, 0);
|
||||||
|
|
||||||
if(dr[i].top - baseline >= 4) // 2?
|
// Time Crisis 2/3 uses two side by side images when in split screen mode.
|
||||||
|
off.x = tex[i]->GetScale().x * (dr[i].left - baseline.x);
|
||||||
|
|
||||||
|
if(dr[i].top - baseline.y >= 4) // 2?
|
||||||
{
|
{
|
||||||
off.y = tex[i]->GetScale().y * (dr[i].top - baseline);
|
off.y = tex[i]->GetScale().y * (dr[i].top - baseline.y);
|
||||||
|
|
||||||
if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD)
|
if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue