From 376cadb8620a5b1316f537f11279c6a78a903c27 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Thu, 1 Sep 2016 17:23:07 +0200 Subject: [PATCH] VertexShaderManager: Explicitly use floating-point variant of abs. Some compilers don't have an automatic abs() overload for floats. Doesn't really matter if they use the integer variant here, but it's better to be explicit about the fact that we're using floats. --- Source/Core/VideoCommon/VertexShaderManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index 11f5be0ab5..fdc6f8cd8a 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -398,7 +398,7 @@ void VertexShaderManager::SetConstants() // where the console also uses reversed depth with the same accuracy. We need // to make sure the depth range is positive here and then reverse the depth in // the backend viewport. - constants.pixelcentercorrection[2] = abs(xfmem.viewport.zRange) / 16777215.0f; + constants.pixelcentercorrection[2] = fabs(xfmem.viewport.zRange) / 16777215.0f; if (xfmem.viewport.zRange < 0.0f) constants.pixelcentercorrection[3] = xfmem.viewport.farZ / 16777215.0f; else