Minor refactor in PresentationCommon (combine loose coordinates to a struct)

This commit is contained in:
Henrik Rydgård 2020-05-31 19:45:28 +02:00
parent 8e7d2109fe
commit e559fc022f
4 changed files with 48 additions and 35 deletions

View file

@ -660,9 +660,9 @@ void FramebufferManagerCommon::DrawPixels(VirtualFramebuffer *vfb, int dstX, int
std::swap(v0, v1);
flags = g_Config.iBufFilter == SCALE_LINEAR ? DRAWTEX_LINEAR : DRAWTEX_NEAREST;
flags = flags | DRAWTEX_TO_BACKBUFFER;
float x, y, w, h;
CenterDisplayOutputRect(&x, &y, &w, &h, 480.0f, 272.0f, (float)pixelWidth_, (float)pixelHeight_, ROTATION_LOCKED_HORIZONTAL);
SetViewport2D(x, y, w, h);
FRect rc;
CenterDisplayOutputRect(&rc, 480.0f, 272.0f, (float)pixelWidth_, (float)pixelHeight_, ROTATION_LOCKED_HORIZONTAL);
SetViewport2D(rc.x, rc.y, rc.w, rc.h);
draw_->SetScissorRect(0, 0, pixelWidth_, pixelHeight_);
}