summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_directx.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 242a6563b3..157b6a812e 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -30,6 +30,7 @@
#include "fastmemcpy.h"
#include "../input/input.h"
#include "../osdep/keycodes.h"
+#include "../input/mouse.h"
#include "../mp_msg.h"
#include "aspect.h"
#include "geometry.h"
@@ -908,6 +909,35 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
mplayer_put_key(wParam);
break;
}
+ case WM_LBUTTONDOWN:
+ {
+ if (!vo_nomouse_input)
+ mplayer_put_key(MOUSE_BTN0);
+ 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)
+ break;
+ 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);