We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4eef2d commit 2e1f992Copy full SHA for 2e1f992
src/frontend/mame/ui/menu.cpp
@@ -667,7 +667,9 @@ void menu::draw(uint32_t flags)
667
668
// compute top/left of inner menu area by centering
669
float const visible_left = (1.0F - visible_width) * 0.5F;
670
- m_items_top = std::round((((1.0F - visible_main_menu_height - visible_extra_menu_height) * 0.5F) + top_extra_menu_height) * float(m_last_size.second)) / float(m_last_size.second);
+ m_items_top = ((1.0F - visible_main_menu_height - visible_extra_menu_height) * 0.5F) + top_extra_menu_height;
671
+ if (m_last_size.second != 0)
672
+ m_items_top = std::round(m_items_top * float(m_last_size.second)) / float(m_last_size.second);
673
674
// first add us a box
675
float const x1 = visible_left - lr_border();
0 commit comments