changeset 31050:340fd8115a78

Support mouse movements in SDL. Currently for some reason broken with -vo sdl.
author reimar
date Sun, 25 Apr 2010 16:15:00 +0000
parents b40e41324173
children 109e37bbb151
files libvo/sdl_common.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/sdl_common.c	Sun Apr 25 16:13:57 2010 +0000
+++ b/libvo/sdl_common.c	Sun Apr 25 16:15:00 2010 +0000
@@ -47,7 +47,6 @@
 
     // 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 @@
     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);