From de0bd3f3f72930bae05c8fa56b5de24cd3a518f7 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 30 Sep 2017 14:19:45 +1000 Subject: work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81721 (nw) --- src/emu/render.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/emu/render.cpp b/src/emu/render.cpp index 5fa3fb5a32b..a8671edbd8f 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -1745,39 +1745,39 @@ void render_target::load_layout_files(const internal_layout *layoutfile, bool si }); // generate tiled views - for (unsigned minor = 2; ((screens + minor - 1) / minor) >= minor; ++minor) + for (unsigned mindim = 2; ((screens + mindim - 1) / mindim) >= mindim; ++mindim) { - unsigned const major((screens + minor - 1) / minor); - unsigned const remainder(screens % major); - if (!remainder || (((major + 1) / 2) <= remainder)) + unsigned const majdim((screens + mindim - 1) / mindim); + unsigned const remainder(screens % majdim); + if (!remainder || (((majdim + 1) / 2) <= remainder)) { generate_view( - util::string_format("%1$u\xC3\x97%2$u Left-to-Right, Top-to-Bottom", major, minor).c_str(), - [major, stdwidth, stdheight] (util::xml::data_node &boundsnode, unsigned i) + util::string_format("%1$u\xC3\x97%2$u Left-to-Right, Top-to-Bottom", majdim, mindim).c_str(), + [majdim, stdwidth, stdheight] (util::xml::data_node &boundsnode, unsigned i) { - boundsnode.set_attribute_float("x", (i % major) * (stdwidth + 0.03f)); - boundsnode.set_attribute_float("y", (i / major) * (stdheight + 0.03f)); + boundsnode.set_attribute_float("x", (i % majdim) * (stdwidth + 0.03f)); + boundsnode.set_attribute_float("y", (i / majdim) * (stdheight + 0.03f)); }); generate_view( - util::string_format("%1$u\xC3\x97%2$u Left-to-Right, Top-to-Bottom (Gapless)", major, minor).c_str(), - [major, stdwidth, stdheight] (util::xml::data_node &boundsnode, unsigned i) + util::string_format("%1$u\xC3\x97%2$u Left-to-Right, Top-to-Bottom (Gapless)", majdim, mindim).c_str(), + [majdim, stdwidth, stdheight] (util::xml::data_node &boundsnode, unsigned i) { - boundsnode.set_attribute_int("x", (i % major) * stdwidth); - boundsnode.set_attribute_int("y", (i / major) * stdheight); + boundsnode.set_attribute_int("x", (i % majdim) * stdwidth); + boundsnode.set_attribute_int("y", (i / majdim) * stdheight); }); generate_view( - util::string_format("%1$u\xC3\x97%2$u Top-to-Bottom, Left-to-Right", minor, major).c_str(), - [major, stdwidth, stdheight] (util::xml::data_node &boundsnode, unsigned i) + util::string_format("%1$u\xC3\x97%2$u Top-to-Bottom, Left-to-Right", mindim, majdim).c_str(), + [majdim, stdwidth, stdheight] (util::xml::data_node &boundsnode, unsigned i) { - boundsnode.set_attribute_float("x", (i / major) * (stdwidth + 0.03f)); - boundsnode.set_attribute_float("y", (i % major) * (stdheight + 0.03f)); + boundsnode.set_attribute_float("x", (i / majdim) * (stdwidth + 0.03f)); + boundsnode.set_attribute_float("y", (i % majdim) * (stdheight + 0.03f)); }); generate_view( - util::string_format("%1$u\xC3\x97%2$u Top-to-Bottom, Left-to-Right (Gapless)", minor, major).c_str(), - [major, stdwidth, stdheight] (util::xml::data_node &boundsnode, unsigned i) + util::string_format("%1$u\xC3\x97%2$u Top-to-Bottom, Left-to-Right (Gapless)", mindim, majdim).c_str(), + [majdim, stdwidth, stdheight] (util::xml::data_node &boundsnode, unsigned i) { - boundsnode.set_attribute_int("x", (i / major) * stdwidth); - boundsnode.set_attribute_int("y", (i % major) * stdheight); + boundsnode.set_attribute_int("x", (i / majdim) * stdwidth); + boundsnode.set_attribute_int("y", (i % majdim) * stdheight); }); } } -- cgit v1.2.3