summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/menu.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-11-10 00:24:21 +1100
committer Vas Crabb <vas@vastheman.com>2021-11-10 00:24:21 +1100
commit39bd1e3558a3c01c83e20fdcf7b42108b61c4f32 (patch)
tree9886fab93ad34c0233e1d6c59bcd32da99809847 /src/frontend/mame/ui/menu.h
parent98ec00423d3f1d6ff1cd0d537762ba42d625c5e5 (diff)
-stv.cpp: Removed most run time I/O port lookups and removed PORT_RESET.
* IOGA port G counter reset is emulated correctly now. * Increased sensitivity for patocar trackball – it seemed too slow with mouse or analog stick. -frontend: Handle analog controls with high sensitivity numbers better. -arcadia.cpp: Removed commented PORT_RESET - it makes no sense for joysticks anyway.
Diffstat (limited to 'src/frontend/mame/ui/menu.h')
-rw-r--r--src/frontend/mame/ui/menu.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/frontend/mame/ui/menu.h b/src/frontend/mame/ui/menu.h
index 6c5238eacef..e5904f2f347 100644
--- a/src/frontend/mame/ui/menu.h
+++ b/src/frontend/mame/ui/menu.h
@@ -207,13 +207,13 @@ protected:
float maxwidth(origwidth);
for (Iter it = begin; it != end; ++it)
{
- float width;
- ui().draw_text_full(
- container(), std::string_view(*it),
- 0.0f, 0.0f, 1.0f, justify, wrap,
- mame_ui_manager::NONE, rgb_t::black(), rgb_t::white(),
- &width, nullptr, text_size);
- maxwidth = (std::max)(maxwidth, width);
+ std::string_view const &line(*it);
+ if (!line.empty())
+ {
+ auto layout = ui().create_layout(container(), 1.0f, justify, wrap);
+ layout.add_text(std::string_view(*it), rgb_t::white(), rgb_t::black(), text_size);
+ maxwidth = (std::max)(layout.actual_width(), maxwidth);
+ }
}
if (scale && (origwidth < maxwidth))
{