summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-04-25 16:15:00 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-04-25 16:15:00 +0000
commit3d2259d365bc410c2aad5667c8de7aa32f9ca433 (patch)
tree0df63f37ca24022219d4083a4e2db9d5ad3bf0a7 /libvo
parent14c018a80f4908a6540e76e08047dcbf6d9dc059 (diff)
downloadmpv-3d2259d365bc410c2aad5667c8de7aa32f9ca433.tar.bz2
mpv-3d2259d365bc410c2aad5667c8de7aa32f9ca433.tar.xz
Support mouse movements in SDL.
Currently for some reason broken with -vo sdl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31092 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/sdl_common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libvo/sdl_common.c b/libvo/sdl_common.c
index 66e1fd6f61..9764ddc389 100644
--- a/libvo/sdl_common.c
+++ b/libvo/sdl_common.c
@@ -47,7 +47,6 @@ int vo_sdl_init(void)
// We don't want those in our event queue.
SDL_EventState(SDL_ACTIVEEVENT, SDL_IGNORE);
- SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE);
SDL_EventState(SDL_USEREVENT, SDL_IGNORE);
@@ -131,6 +130,10 @@ int sdl_default_handle_event(SDL_Event *event)
case SDL_VIDEOEXPOSE:
return VO_EVENT_EXPOSE;
+ case SDL_MOUSEMOTION:
+ vo_mouse_movement(event->motion.x, event->motion.y);
+ break;
+
case SDL_MOUSEBUTTONDOWN:
if (!vo_nomouse_input)
mplayer_put_key((MOUSE_BTN0 + event->button.button - 1) | MP_KEY_DOWN);