[mythtv] Re: [PATCH] Fix scrolling text

Robson Braga Araujo robson at akwan.com.br
Thu Apr 21 13:27:30 UTC 2005


On Fri, Apr 15, 2005 at 12:27:15AM -0300, Robson Braga Araujo wrote:
> Hi,
> 
> This patch fixes the problem when we send various scrolling messages
> using mythtvosd. Every message got a little bit more delayed to show its
> text in the screen. This happened because myth was modifying
> m_displaysize and not restoring it to its original size.
> 
> This patch restores it and works for all cases. The scrolling text is
> always instantaneous now.

Resending. Any reasons not to accept this? Thanks.

-- 
[]s,
Robson Braga Araujo
Ciencia da Computacao - UFMG      http://www.dcc.ufmg.br/
Akwan Information Technologies    http://www.akwan.com.br/

   A voice crackles in Calvin's radio:
   "Enemy fighters at two o'clock!"
   "Roger. What should I do until then?"
-------------- next part --------------
Index: osdtypes.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/osdtypes.cpp,v
retrieving revision 1.58
diff -u -r1.58 osdtypes.cpp
--- osdtypes.cpp	1 Apr 2005 02:38:31 -0000	1.58
+++ osdtypes.cpp	15 Apr 2005 03:19:26 -0000
@@ -446,6 +446,7 @@
     m_altfont = NULL;
     
     m_displaysize = displayrect;
+    m_screensize = displayrect;
     m_multiline = false;
     m_centered = false;
     m_right = false;
@@ -462,6 +463,7 @@
            : OSDType(other.m_name)
 {
     m_displaysize = other.m_displaysize;
+    m_screensize = other.m_screensize;
     m_message = other.m_message;
     m_default_msg = other.m_default_msg;
     m_font = other.m_font;
@@ -500,12 +502,12 @@
 
 void OSDTypeText::Reinit(float wchange, float hchange)
 {
-    int width = (int)(m_displaysize.width() * wchange);
-    int height = (int)(m_displaysize.height() * hchange);
-    int x = (int)(m_displaysize.x() * wchange);
-    int y = (int)(m_displaysize.y() * hchange);
+    int width = (int)(m_screensize.width() * wchange);
+    int height = (int)(m_screensize.height() * hchange);
+    int x = (int)(m_screensize.x() * wchange);
+    int y = (int)(m_screensize.y() * hchange);
 
-    m_displaysize = QRect(x, y, width, height);
+    m_displaysize = m_screensize = QRect(x, y, width, height);
 }
 
 void OSDTypeText::Draw(OSDSurface *surface, int fade, int maxfade, int xoff, 
@@ -598,6 +600,7 @@
     {
         if (!m_scrollinit)
         {
+            m_displaysize = m_screensize;
             if (m_scrollx < 0)
             {
                 int numspaces = m_displaysize.width() / m_font->SpaceWidth();
Index: osdtypes.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/osdtypes.h,v
retrieving revision 1.26
diff -u -r1.26 osdtypes.h
--- osdtypes.h	1 Apr 2005 02:38:31 -0000	1.26
+++ osdtypes.h	15 Apr 2005 03:19:27 -0000
@@ -184,6 +184,7 @@
                     int fade, int maxfade, int xoff, int yoff);
 
     QRect m_displaysize;
+    QRect m_screensize;
     QString m_message;
     QString m_default_msg;
 


More information about the mythtv-dev mailing list