diff options
author | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-22 06:14:38 +0000 |
---|---|---|
committer | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-22 06:14:38 +0000 |
commit | 673246be0c4d85d1aba6865e2451bed19bb01f43 (patch) | |
tree | 6c9b30eb613a6e9ae703577edb57a48cd42e1353 /command.c | |
parent | d2cef4c24019ae7724c1bd0eff6d4e30f63b22a1 (diff) | |
download | mpv-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.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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; |