[MPlayer-dev-eng] [PATCH] Add mouse support for DVDNAV under Windows

Zuxy Meng zuxy.meng at gmail.com
Thu Feb 8 13:15:58 CET 2007


Hi,

With the patch user can use mouse to select dvdnav menu buttons under
Windows. Currently for '-vo gl' and '-vo gl2' only, although
supporting the default '-vo directx' won't be hard, but I wish we can
simply merge the two WndProc in w32_common.c and vo_directx.c.

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
Index: libvo/w32_common.c
===================================================================
--- libvo/w32_common.c	???????? 22173??
+++ libvo/w32_common.c	????????????
@@ -1,5 +1,7 @@
+#include <stdio.h>
 #include <limits.h>
 #include <windows.h>
+#include <windowsx.h>
 
 #include "osdep/keycodes.h"
 #include "input/input.h"
@@ -10,6 +12,7 @@
 #include "w32_common.h"
 
 extern void mplayer_put_key(int code);
+extern int enable_mouse_movements;
 
 #ifndef MONITOR_DEFAULTTOPRIMARY
 #define MONITOR_DEFAULTTOPRIMARY 1
@@ -111,6 +114,14 @@
 	    if (!vo_nomouse_input)
 		mplayer_put_key(MOUSE_BTN2);
 	    break;
+	case WM_MOUSEMOVE:
+	    if (enable_mouse_movements) {
+		char cmd_str[40];
+		snprintf(cmd_str, sizeof(cmd_str), "set_mouse_pos %i %i",
+			GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
+		mp_input_queue_cmd(mp_input_parse_cmd(cmd_str));
+	    }
+	    break;
 	case WM_MOUSEWHEEL:
 	    if (!vo_nomouse_input) {
 		int x = GET_WHEEL_DELTA_WPARAM(wParam);


More information about the MPlayer-dev-eng mailing list