summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/command.c b/command.c
index 9710ca87f3..d6da090f45 100644
--- a/command.c
+++ b/command.c
@@ -51,6 +51,10 @@
#include "libass/ass.h"
#include "libass/ass_mp.h"
#endif
+#ifdef HAVE_MENU
+#include "m_struct.h"
+#include "libmenu/menu.h"
+#endif
#ifdef HAVE_NEW_GUI
#include "gui/interface.h"
#endif
@@ -60,6 +64,8 @@
#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))
+extern int use_menu;
+
static void rescale_input_coordinates(int ix, int iy, double *dx, double *dy)
{
//remove the borders, if any, and rescale to the range [0,1],[0,1]
@@ -2992,6 +2998,10 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd)
"Selected button number %d", button);
}
#endif
+#ifdef HAVE_MENU
+ if (use_menu && dx >= 0.0 && dy >= 0.0)
+ menu_update_mouse_pos(dx, dy);
+#endif
}
break;