changeset 13157:0d44af5bec83

added "xbutton" support for 4-5 button mice
author joey
date Thu, 26 Aug 2004 22:15:26 +0000
parents ccce2d564161
children b872a27aea9e
files libvo/vo_directx.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_directx.c	Thu Aug 26 19:46:12 2004 +0000
+++ b/libvo/vo_directx.c	Thu Aug 26 22:15:26 2004 +0000
@@ -35,6 +35,12 @@
 #include "aspect.h"
 #include "geometry.h"
 
+#ifndef WM_XBUTTONDOWN
+# define WM_XBUTTONDOWN    0x020B
+# define WM_XBUTTONUP      0x020C
+# define WM_XBUTTONDBLCLK  0x020D
+#endif
+
 static LPDIRECTDRAW7        g_lpdd = NULL;          //DirectDraw Object
 static LPDIRECTDRAWSURFACE7  g_lpddsPrimary = NULL;  //Primary Surface: viewport through the Desktop
 static LPDIRECTDRAWSURFACE7  g_lpddsOverlay = NULL;  //Overlay Surface
@@ -907,6 +913,16 @@
 				mplayer_put_key(MOUSE_BTN4);
 			break;
 		}
+        case WM_XBUTTONDOWN:
+		{
+			if (vo_nomouse_input)
+				break;
+			if (HIWORD(wParam) == 1)
+				mplayer_put_key(MOUSE_BTN5);
+			else
+				mplayer_put_key(MOUSE_BTN6);
+			break;
+		}
 		
     }
 	return DefWindowProc(hWnd, message, wParam, lParam);