diff options
author | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-03-13 16:37:12 +0000 |
---|---|---|
committer | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-03-13 16:37:12 +0000 |
commit | 89af98f42bd820caeed3b26e92faf97257d49e89 (patch) | |
tree | 2b90fe45262d6d6fc1fbace02d7f3ffcb7d6d2f8 | |
parent | b3372bc0d0b5ea0bfa4c77c41850e483e97beb16 (diff) | |
download | mpv-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
-rw-r--r-- | libvo/vo_directx.c | 30 |
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); |