diff command.c @ 25461:7ef04742572c

OSD menu support mouse selection.
author ulion
date Sat, 22 Dec 2007 06:14:38 +0000
parents f8f596bad3bd
children 3e033aabc9d2
line wrap: on
line diff
--- a/command.c	Sat Dec 22 03:45:14 2007 +0000
+++ b/command.c	Sat Dec 22 06:14:38 2007 +0000
@@ -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 @@
 				    "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;