Fixed a few warnings.

This commit is contained in:
Matthew Parlane 2012-02-09 17:18:46 +13:00
parent c9dfcf8cf7
commit fc3eb7c6a7
1 changed files with 7 additions and 4 deletions

View File

@ -695,15 +695,18 @@ void Renderer::UpdateViewport(Matrix44& vpCorrection)
int Ht = intendedHt; int Ht = intendedHt;
if (Y + Ht > GetTargetHeight()) if (Y + Ht > GetTargetHeight())
Ht = GetTargetHeight() - Y; Ht = GetTargetHeight() - Y;
// If GX viewport is off the render target, we must clamp our viewport // If GX viewport is off the render target, we must clamp our viewport
// within the bounds. Use the correction matrix to compensate. // within the bounds. Use the correction matrix to compensate.
ViewportCorrectionMatrix(vpCorrection, ViewportCorrectionMatrix(vpCorrection,
intendedX, intendedY, intendedWd, intendedHt, (float)intendedX, (float)intendedY,
X, Y, Wd, Ht); (float)intendedWd, (float)intendedHt,
(float)X, (float)Y,
(float)Wd, (float)Ht);
// Some games set invalids values for z min and z max so fix them to the max an min alowed and let the shaders do this work // Some games set invalids values for z min and z max so fix them to the max an min alowed and let the shaders do this work
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y, Wd, Ht, D3D11_VIEWPORT vp = CD3D11_VIEWPORT((float)X, (float)Y,
(float)Wd, (float)Ht,
0.f, // (xfregs.viewport.farZ - xfregs.viewport.zRange) / 16777216.0f; 0.f, // (xfregs.viewport.farZ - xfregs.viewport.zRange) / 16777216.0f;
1.f); // xfregs.viewport.farZ / 16777216.0f; 1.f); // xfregs.viewport.farZ / 16777216.0f;
D3D::context->RSSetViewports(1, &vp); D3D::context->RSSetViewports(1, &vp);