Skip to content

Commit

Permalink
d3d9: Correct for half-pixel offset in softgpu.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Feb 13, 2016
1 parent f84ebdc commit 818a0d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions GPU/Software/SoftGpu.cpp
Expand Up @@ -165,6 +165,11 @@ void SoftGPU::CopyToCurrentFboFromDisplayRam(int srcwidth, int srcheight)
float x, y, w, h;
CenterDisplayOutputRect(&x, &y, &w, &h, 480.0f, 272.0f, dstwidth, dstheight, ROTATION_LOCKED_HORIZONTAL);

if (GetGPUBackend() == GPUBackend::DIRECT3D9) {
x += 0.5f;
y += 0.5f;
}

x /= 0.5f * dstwidth;
y /= 0.5f * dstheight;
w /= 0.5f * dstwidth;
Expand Down

0 comments on commit 818a0d8

Please sign in to comment.