summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/menu.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-04-27 15:42:06 -0400
committer AJR <ajrhacker@users.noreply.github.com>2016-04-27 15:42:06 -0400
commitb3578a6ec8ee41328cb1b02d462c41b18fbcee2d (patch)
tree43526309acdbb0f67adad001a5b73e034301fd7e /src/frontend/mame/ui/menu.cpp
parente06384aaba8f618ad049d9fe933c76eccf24594a (diff)
parentfe6b9390c7b7a8887db644e62d102976939cd922 (diff)
Merge remote-tracking branch 'upstream/master' into mui
Diffstat (limited to 'src/frontend/mame/ui/menu.cpp')
-rw-r--r--src/frontend/mame/ui/menu.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp
index e1aae6b98e7..af7213d172f 100644
--- a/src/frontend/mame/ui/menu.cpp
+++ b/src/frontend/mame/ui/menu.cpp
@@ -558,37 +558,37 @@ void ui_menu::draw(UINT32 flags, float origx0, float origy0)
float visible_left = (1.0f - visible_width) * 0.5f;
float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
-/* float visible_left;
- float visible_top;
- if (origx0 == 0.0f && origy0 == 0.0f)
- {
- visible_left = (1.0f - visible_width) * 0.5f;
- visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
- }
- else
- {
- INT32 mouse_target_x, mouse_target_y;
- float m_x, m_y;
- render_target *mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button);
- if (mouse_target != nullptr)
- {
- if (mouse_target->map_point_container(origx0, origy0, *container, m_x, m_y))
- {
- visible_left = m_x;
- visible_top = m_y;
- }
- else
- {
- visible_left = (1.0f - visible_width) * 0.5f;
- visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
- }
- }
- else
- {
- visible_left = (1.0f - visible_width) * 0.5f;
- visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
- }
- }
+/* float visible_left;
+ float visible_top;
+ if (origx0 == 0.0f && origy0 == 0.0f)
+ {
+ visible_left = (1.0f - visible_width) * 0.5f;
+ visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
+ }
+ else
+ {
+ INT32 mouse_target_x, mouse_target_y;
+ float m_x, m_y;
+ render_target *mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button);
+ if (mouse_target != nullptr)
+ {
+ if (mouse_target->map_point_container(origx0, origy0, *container, m_x, m_y))
+ {
+ visible_left = m_x;
+ visible_top = m_y;
+ }
+ else
+ {
+ visible_left = (1.0f - visible_width) * 0.5f;
+ visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
+ }
+ }
+ else
+ {
+ visible_left = (1.0f - visible_width) * 0.5f;
+ visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f;
+ }
+ }
*/
// if the menu is at the bottom of the extra, adjust
visible_top += customtop;