mirror of https://github.com/PCSX2/pcsx2.git
GS/PCRTC/HW: Correct height of framebuffer reads
This commit is contained in:
parent
ade6a6c3ab
commit
3a242b513c
|
@ -4458,6 +4458,9 @@ GSVector2i GSState::GSPCRTCRegs::GetFramebufferSize(int display)
|
||||||
combined_rect.z += std::max(PCRTCDisplays[0].framebufferOffsets.x, PCRTCDisplays[1].framebufferOffsets.x);
|
combined_rect.z += std::max(PCRTCDisplays[0].framebufferOffsets.x, PCRTCDisplays[1].framebufferOffsets.x);
|
||||||
combined_rect.w += std::max(PCRTCDisplays[0].framebufferOffsets.y, PCRTCDisplays[1].framebufferOffsets.y);
|
combined_rect.w += std::max(PCRTCDisplays[0].framebufferOffsets.y, PCRTCDisplays[1].framebufferOffsets.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
max_height += combined_rect.y;
|
||||||
|
|
||||||
offset = (max_height / min_mag) - offset;
|
offset = (max_height / min_mag) - offset;
|
||||||
combined_rect.w = std::min(combined_rect.w, offset);
|
combined_rect.w = std::min(combined_rect.w, offset);
|
||||||
return GSVector2i(combined_rect.z, combined_rect.w);
|
return GSVector2i(combined_rect.z, combined_rect.w);
|
||||||
|
@ -4481,6 +4484,8 @@ GSVector2i GSState::GSPCRTCRegs::GetFramebufferSize(int display)
|
||||||
offset = (offset - 1) / 2;
|
offset = (offset - 1) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
max_height += out_rect.y;
|
||||||
|
|
||||||
offset = (max_height / min_mag) - offset;
|
offset = (max_height / min_mag) - offset;
|
||||||
out_rect.w = std::min(out_rect.w, offset);
|
out_rect.w = std::min(out_rect.w, offset);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue