From d7a9eeb64ff8f2388acb975968b32e2c3735dde2 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 28 Sep 2016 23:57:34 +1000 Subject: [PATCH] use floorf rather than floor for float->float --- src/osd/modules/render/bgfx/chain.cpp | 4 ++-- src/osd/modules/render/bgfx/chainmanager.cpp | 4 ++-- src/osd/modules/render/d3d/d3dhlsl.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/osd/modules/render/bgfx/chain.cpp b/src/osd/modules/render/bgfx/chain.cpp index 352bb6f918c..c7691973854 100644 --- a/src/osd/modules/render/bgfx/chain.cpp +++ b/src/osd/modules/render/bgfx/chain.cpp @@ -78,8 +78,8 @@ void bgfx_chain::process(render_primitive* prim, int view, int screen, texture_m screen_device* screen_device = screen_iterator.byindex(screen); uint16_t screen_count(window.target()->current_view()->screens().count()); - uint16_t screen_width(floor(prim->get_quad_width() + 0.5f)); - uint16_t screen_height(floor(prim->get_quad_height() + 0.5f)); + uint16_t screen_width(floorf(prim->get_quad_width() + 0.5f)); + uint16_t screen_height(floorf(prim->get_quad_height() + 0.5f)); uint32_t rotation_type = (window.target()->orientation() & ROT90) == ROT90 ? 1 : (window.target()->orientation() & ROT180) == ROT180 ? 2 : diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp index b58e555862c..37992c27fc8 100644 --- a/src/osd/modules/render/bgfx/chainmanager.cpp +++ b/src/osd/modules/render/bgfx/chainmanager.cpp @@ -435,8 +435,8 @@ uint32_t chain_manager::handle_screen_chains(uint32_t view, render_primitive *st continue; } - uint16_t screen_width(floor(prim->get_full_quad_width() + 0.5f)); - uint16_t screen_height(floor(prim->get_full_quad_height() + 0.5f)); + uint16_t screen_width(floorf(prim->get_full_quad_width() + 0.5f)); + uint16_t screen_height(floorf(prim->get_full_quad_height() + 0.5f)); if (window.swap_xy()) { std::swap(screen_width, screen_height); diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp index 837e599b904..0a291fd917e 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.cpp +++ b/src/osd/modules/render/d3d/d3dhlsl.cpp @@ -2397,8 +2397,8 @@ void uniform::update() if (shadersys->curr_poly) { float quaddims[2] = { - floor(shadersys->curr_poly->prim_width() + 0.5f), - floor(shadersys->curr_poly->prim_height() + 0.5f) }; + floorf(shadersys->curr_poly->prim_width() + 0.5f), + floorf(shadersys->curr_poly->prim_height() + 0.5f) }; m_shader->set_vector("QuadDims", 2, quaddims); } break;