mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
use floorf rather than floor for float->float
This commit is contained in:
parent
ecf1e166fc
commit
d7a9eeb64f
@ -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);
|
screen_device* screen_device = screen_iterator.byindex(screen);
|
||||||
|
|
||||||
uint16_t screen_count(window.target()->current_view()->screens().count());
|
uint16_t screen_count(window.target()->current_view()->screens().count());
|
||||||
uint16_t screen_width(floor(prim->get_quad_width() + 0.5f));
|
uint16_t screen_width(floorf(prim->get_quad_width() + 0.5f));
|
||||||
uint16_t screen_height(floor(prim->get_quad_height() + 0.5f));
|
uint16_t screen_height(floorf(prim->get_quad_height() + 0.5f));
|
||||||
uint32_t rotation_type =
|
uint32_t rotation_type =
|
||||||
(window.target()->orientation() & ROT90) == ROT90 ? 1 :
|
(window.target()->orientation() & ROT90) == ROT90 ? 1 :
|
||||||
(window.target()->orientation() & ROT180) == ROT180 ? 2 :
|
(window.target()->orientation() & ROT180) == ROT180 ? 2 :
|
||||||
|
@ -435,8 +435,8 @@ uint32_t chain_manager::handle_screen_chains(uint32_t view, render_primitive *st
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t screen_width(floor(prim->get_full_quad_width() + 0.5f));
|
uint16_t screen_width(floorf(prim->get_full_quad_width() + 0.5f));
|
||||||
uint16_t screen_height(floor(prim->get_full_quad_height() + 0.5f));
|
uint16_t screen_height(floorf(prim->get_full_quad_height() + 0.5f));
|
||||||
if (window.swap_xy())
|
if (window.swap_xy())
|
||||||
{
|
{
|
||||||
std::swap(screen_width, screen_height);
|
std::swap(screen_width, screen_height);
|
||||||
|
@ -2397,8 +2397,8 @@ void uniform::update()
|
|||||||
if (shadersys->curr_poly)
|
if (shadersys->curr_poly)
|
||||||
{
|
{
|
||||||
float quaddims[2] = {
|
float quaddims[2] = {
|
||||||
floor(shadersys->curr_poly->prim_width() + 0.5f),
|
floorf(shadersys->curr_poly->prim_width() + 0.5f),
|
||||||
floor(shadersys->curr_poly->prim_height() + 0.5f) };
|
floorf(shadersys->curr_poly->prim_height() + 0.5f) };
|
||||||
m_shader->set_vector("QuadDims", 2, quaddims);
|
m_shader->set_vector("QuadDims", 2, quaddims);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user