summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-22 06:14:38 +0000
committerulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-22 06:14:38 +0000
commit673246be0c4d85d1aba6865e2451bed19bb01f43 (patch)
tree6c9b30eb613a6e9ae703577edb57a48cd42e1353 /command.c
parentd2cef4c24019ae7724c1bd0eff6d4e30f63b22a1 (diff)
downloadmpv-673246be0c4d85d1aba6865e2451bed19bb01f43.tar.bz2
mpv-673246be0c4d85d1aba6865e2451bed19bb01f43.tar.xz
OSD menu support mouse selection.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25489 b3059339-0415-0410-9bf9-f77b7e298cf2
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;