mirror of https://github.com/mpv-player/mpv
mouse support by Nehal Mistry <nehalmistry at gmx.net>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12021 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b3372bc0d0
commit
89af98f42b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue