From c3039ccba2378d8bb3e6e656b96dd6153e092ef5 Mon Sep 17 00:00:00 2001 From: phintuka Date: Sat, 20 Feb 2010 22:29:41 +0000 Subject: Fixed re-centering unscaled OSD --- xine/osd_manager.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xine/osd_manager.c b/xine/osd_manager.c index 8777a957..ffe8df14 100644 --- a/xine/osd_manager.c +++ b/xine/osd_manager.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: osd_manager.c,v 1.15 2010-02-20 22:28:16 phintuka Exp $ + * $Id: osd_manager.c,v 1.16 2010-02-20 22:29:41 phintuka Exp $ * */ @@ -456,10 +456,19 @@ static int exec_osd_set_rle(osd_manager_impl_t *this, osd_command_t *cmd) /* if no scaling was required, we may still need to re-center OSD */ if (!this->vo_scaling && !rle_scaled) { + if (!use_unscaled) { if (this->video_width != osd->extent_width) ov_overlay.x += (this->video_width - osd->extent_width)/2; if (this->video_height != osd->extent_height) ov_overlay.y += (this->video_height - osd->extent_height)/2; + } else { + if (this->win_width >= 360 && this->win_height >= 288) { + if (this->win_width != osd->extent_width) + ov_overlay.x += (this->win_width - osd->extent_width)/2; + if (this->win_height != osd->extent_height) + ov_overlay.y += (this->win_height - osd->extent_height)/2; + } + } } /* store rle for later scaling (done if video size changes) */ -- cgit v1.2.3