[mythtv] [PATCH] Fix scrolling text
Robson Braga Araujo
robson at akwan.com.br
Fri Apr 15 03:27:15 UTC 2005
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.
--
[]s,
Robson Braga Araujo
Ciencia da Computacao - UFMG http://www.dcc.ufmg.br/
Akwan Information Technologies http://www.akwan.com.br/
This is so cool I've to go to the bathroom.
-- Calvin
-------------- 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