From cdb956fd340e95fea1cc8b1648abaf37c5dd1b7f Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 2 Aug 2018 23:42:19 +1000 Subject: [PATCH] (nw) apparently msys glibstdc++ doesn't have that std::abs overload... --- src/emu/rendlay.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp index bc9e708bb5b..b47d643e254 100644 --- a/src/emu/rendlay.cpp +++ b/src/emu/rendlay.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -990,12 +991,12 @@ layout_group::transform layout_group::make_transform(int orientation, render_bou // apply to bounds and force into destination rectangle render_bounds bounds(m_bounds); render_bounds_transform(bounds, result); - result[0][0] *= (dest.x1 - dest.x0) / std::abs(bounds.x1 - bounds.x0); - result[0][1] *= (dest.x1 - dest.x0) / std::abs(bounds.x1 - bounds.x0); - result[0][2] = dest.x0 - ((std::min)(bounds.x0, bounds.x1) * (dest.x1 - dest.x0) / std::abs(bounds.x1 - bounds.x0)); - result[1][0] *= (dest.y1 - dest.y0) / std::abs(bounds.y1 - bounds.y0); - result[1][1] *= (dest.y1 - dest.y0) / std::abs(bounds.y1 - bounds.y0); - result[1][2] = dest.y0 - ((std::min)(bounds.y0, bounds.y1) * (dest.y1 - dest.y0) / std::abs(bounds.y1 - bounds.y0)); + result[0][0] *= (dest.x1 - dest.x0) / std::fabs(bounds.x1 - bounds.x0); + result[0][1] *= (dest.x1 - dest.x0) / std::fabs(bounds.x1 - bounds.x0); + result[0][2] = dest.x0 - ((std::min)(bounds.x0, bounds.x1) * (dest.x1 - dest.x0) / std::fabs(bounds.x1 - bounds.x0)); + result[1][0] *= (dest.y1 - dest.y0) / std::fabs(bounds.y1 - bounds.y0); + result[1][1] *= (dest.y1 - dest.y0) / std::fabs(bounds.y1 - bounds.y0); + result[1][2] = dest.y0 - ((std::min)(bounds.y0, bounds.y1) * (dest.y1 - dest.y0) / std::fabs(bounds.y1 - bounds.y0)); return result; }