summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/analogipt.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-01-12 17:59:59 +1100
committer Vas Crabb <vas@vastheman.com>2023-01-12 18:14:13 +1100
commitfee7047c16a04f816a0de031ec469f5b96be9f74 (patch)
treef9be050cbdb952d8315cc241648e5ddc8422b247 /src/frontend/mame/ui/analogipt.cpp
parent9e8064c85eb420e61df7ba56f197877680e642c6 (diff)
-osd: Better XInput and SDL game controller input enhancements:
* Added initial support for XInput controller subtypes, starting with driving, arcade and flight controllers. * Check XInput capabilities to ignore buttons and hats that aren't present. * Added preliminary SDL Game Controller joystick provider. Reconnection and mixed Game Controller/Joystick devices are unsupported. * Show the input token for the highlighted control on input device menus. -ui: Allow menus to set required space above and below menu when metrics change. Fixes the initial bad layout on the system selecton menu, or bad layout after resizing windows.
Diffstat (limited to 'src/frontend/mame/ui/analogipt.cpp')
-rw-r--r--src/frontend/mame/ui/analogipt.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/frontend/mame/ui/analogipt.cpp b/src/frontend/mame/ui/analogipt.cpp
index 4e3b15aecc8..520026ea479 100644
--- a/src/frontend/mame/ui/analogipt.cpp
+++ b/src/frontend/mame/ui/analogipt.cpp
@@ -66,6 +66,15 @@ menu_analog::~menu_analog()
}
+void menu_analog::recompute_metrics(uint32_t width, uint32_t height, float aspect)
+{
+ menu::recompute_metrics(width, height, aspect);
+
+ // space for live display
+ set_custom_space(0.0f, (line_height() * m_visible_fields) + (tb_border() * 3.0f));
+}
+
+
void menu_analog::custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2)
{
// work out how much space to use for field names
@@ -331,7 +340,7 @@ void menu_analog::handle(event const *ev)
}
-void menu_analog::populate(float &customtop, float &custombottom)
+void menu_analog::populate()
{
// loop over input ports
if (m_item_data.empty())
@@ -401,7 +410,7 @@ void menu_analog::populate(float &customtop, float &custombottom)
item_append(menu_item_type::SEPARATOR);
// space for live display
- custombottom = (line_height() * m_visible_fields) + (tb_border() * 3.0f);
+ set_custom_space(0.0f, (line_height() * m_visible_fields) + (tb_border() * 3.0f));
}