[vlc-commits] Make sdl vout module handle rotated movies.
Matthias Keiser
git at videolan.org
Fri Mar 14 17:25:01 CET 2014
vlc | branch: master | Matthias Keiser <matthias at tristan-inc.com> | Fri Mar 14 01:00:10 2014 +0100| [adb10cda195a9ef665c9da1936b7b803ed8ea250] | committer: Rémi Denis-Courmont
Make sdl vout module handle rotated movies.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=adb10cda195a9ef665c9da1936b7b803ed8ea250
---
modules/video_output/sdl.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c
index 5520bb2..a93f201 100644
--- a/modules/video_output/sdl.c
+++ b/modules/video_output/sdl.c
@@ -165,6 +165,8 @@ static int Open(vlc_object_t *object)
/* */
video_format_t fmt = vd->fmt;
+ video_format_ApplyRotation(&fmt, &vd->fmt);
+ fmt = vd->fmt;
/* */
vout_display_info_t info = vd->info;
@@ -638,11 +640,11 @@ static void Manage(vout_display_t *vd)
if (sys->place.width <= 0 || sys->place.height <= 0)
break;
- const int x = (int64_t)(event.motion.x - sys->place.x) * vd->source.i_width / sys->place.width;
- const int y = (int64_t)(event.motion.y - sys->place.y) * vd->source.i_height / sys->place.height;
-
SDL_ShowCursor(1);
- vout_display_SendEventMouseMoved(vd, x, y);
+
+ vout_display_SendMouseMovedDisplayCoordinates(vd, ORIENT_NORMAL,
+ event.motion.x, event.motion.y,
+ &sys->place);
break;
}
More information about the vlc-commits
mailing list