diff options
Diffstat (limited to 'src/emu/ui/datmenu.cpp')
-rw-r--r-- | src/emu/ui/datmenu.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/emu/ui/datmenu.cpp b/src/emu/ui/datmenu.cpp index a86c7eee5ed..6c240311c62 100644 --- a/src/emu/ui/datmenu.cpp +++ b/src/emu/ui/datmenu.cpp @@ -57,7 +57,7 @@ ui_menu_dats_view::ui_menu_dats_view(running_machine &machine, render_container if (machine.datfile().has_software(m_list, m_short, m_parent)) m_items_list.emplace_back(_("Software History"), UI_HISTORY_LOAD, machine.datfile().rev_history()); - if (swinfo && !swinfo->usage.empty()) + if (swinfo != nullptr && !swinfo->usage.empty()) m_items_list.emplace_back(_("Software Usage"), 0, ""); } @@ -148,12 +148,6 @@ void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom mui.draw_text_full(container, driver.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); - - // take off the borders - x1 -= UI_BOX_LR_BORDER; - x2 += UI_BOX_LR_BORDER; - y1 -= UI_BOX_TB_BORDER; - maxwidth = 0; for (auto & elem : m_items_list) { @@ -165,6 +159,8 @@ void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom float space = (1.0f - maxwidth) / (m_items_list.size() * 2); // compute our bounds + x1 -= UI_BOX_LR_BORDER; + x2 += UI_BOX_LR_BORDER; y1 = y2 + UI_BOX_TB_BORDER; y2 += mui.get_line_height() + 2.0f * UI_BOX_TB_BORDER; |