mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
only normalize component bounds in layout_element::layout_element() when components exist (nw)
avoids division by zero for sets using src/emu/layout/vertical.lay
This commit is contained in:
parent
124803b476
commit
38b44ae386
@ -452,6 +452,8 @@ layout_element::layout_element(running_machine &machine, xml_data_node &elemnode
|
|||||||
m_maxstate = 65536;
|
m_maxstate = 65536;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_complist.first() != NULL)
|
||||||
|
{
|
||||||
// determine the scale/offset for normalization
|
// determine the scale/offset for normalization
|
||||||
float xoffs = bounds.x0;
|
float xoffs = bounds.x0;
|
||||||
float yoffs = bounds.y0;
|
float yoffs = bounds.y0;
|
||||||
@ -466,6 +468,7 @@ layout_element::layout_element(running_machine &machine, xml_data_node &elemnode
|
|||||||
curcomp->m_bounds.y0 = (curcomp->m_bounds.y0 - yoffs) * yscale;
|
curcomp->m_bounds.y0 = (curcomp->m_bounds.y0 - yoffs) * yscale;
|
||||||
curcomp->m_bounds.y1 = (curcomp->m_bounds.y1 - yoffs) * yscale;
|
curcomp->m_bounds.y1 = (curcomp->m_bounds.y1 - yoffs) * yscale;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// allocate an array of element textures for the states
|
// allocate an array of element textures for the states
|
||||||
m_elemtex.resize(m_maxstate + 1);
|
m_elemtex.resize(m_maxstate + 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user