[Mplayer-cvslog] CVS: main/libvo w32_common.c,1.4,1.5

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Aug 1 22:13:45 CEST 2004


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv32263/libvo

Modified Files:
	w32_common.c 
Log Message:
support for passing mouse events on to MPlayer


Index: w32_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/w32_common.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- w32_common.c	29 Feb 2004 17:42:49 -0000	1.4
+++ w32_common.c	1 Aug 2004 20:13:42 -0000	1.5
@@ -58,12 +58,33 @@
 	    mplayer_put_key(wParam);
 	    break;
 	case WM_LBUTTONDOWN:
+	    if (!vo_nomouse_input && (vo_fs || (wParam & MK_CONTROL))) {
+		mplayer_put_key(MOUSE_BTN0);
+		break;
+	    }
 	    if (!vo_fs) {
 		ReleaseCapture();
 		SendMessage(hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0);
 		return 0;
 	    }
 	    break;
+	case WM_MBUTTONDOWN:
+	    if (!vo_nomouse_input)
+		mplayer_put_key(MOUSE_BTN1);
+	    break;
+	case WM_RBUTTONDOWN:
+	    if (!vo_nomouse_input)
+		mplayer_put_key(MOUSE_BTN2);
+	    break;
+	case WM_MOUSEWHEEL:
+	    if (!vo_nomouse_input) {
+		int x = GET_WHEEL_DELTA_WPARAM(wParam);
+		if (x > 0)
+		    mplayer_put_key(MOUSE_BTN3);
+		else
+		    mplayer_put_key(MOUSE_BTN4);
+		break;
+	    }
     }
     
     return DefWindowProc(hWnd, message, wParam, lParam);




More information about the MPlayer-cvslog mailing list