summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-03-13 16:37:12 +0000
committerfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-03-13 16:37:12 +0000
commit89af98f42bd820caeed3b26e92faf97257d49e89 (patch)
tree2b90fe45262d6d6fc1fbace02d7f3ffcb7d6d2f8 /libvo
parentb3372bc0d0b5ea0bfa4c77c41850e483e97beb16 (diff)
downloadmpv-89af98f42bd820caeed3b26e92faf97257d49e89.tar.bz2
mpv-89af98f42bd820caeed3b26e92faf97257d49e89.tar.xz
mouse support by Nehal Mistry <nehalmistry at gmx.net>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12021 b3059339-0415-0410-9bf9-f77b7e298cf2
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);