[MPlayer-cvslog] r37013 - trunk/gui/win32/widgetrender.c

ib subversion at mplayerhq.hu
Thu Mar 13 17:22:27 CET 2014


Author: ib
Date: Thu Mar 13 17:22:27 2014
New Revision: 37013

Log:
Fix bug with dynamic label variables $p, $s and $e in Win32 GUI.

There is no reason to assume that there is nothing but the variable
in the label text. These variables must (like all the other ones)
be handled as a part of the label text.

Modified:
   trunk/gui/win32/widgetrender.c

Modified: trunk/gui/win32/widgetrender.c
==============================================================================
--- trunk/gui/win32/widgetrender.c	Thu Mar 13 16:51:42 2014	(r37012)
+++ trunk/gui/win32/widgetrender.c	Thu Mar 13 17:22:27 2014	(r37013)
@@ -151,12 +151,9 @@ static char *generatetextfromlabel(widge
     stringreplace(text, "$C", "%s", guiInfo.sh_video ? codecname : "");
     stringreplace(text, "$$", "$");
 
-    if(!strcmp(text, "$p") || !strcmp(text, "$s") || !strcmp(text, "$e"))
-    {
-        if(guiInfo.Playing == GUI_STOP) stringreplace(text, NULL, "s");
-        else if(guiInfo.Playing == GUI_PLAY) stringreplace(text, NULL, "p");
-        else if(guiInfo.Playing == GUI_PAUSE) stringreplace(text, NULL, "e");
-    }
+    if(guiInfo.Playing == GUI_STOP) stringreplace(text, "$s", "s");
+    else if(guiInfo.Playing == GUI_PLAY) stringreplace(text, "$p", "p");
+    else if(guiInfo.Playing == GUI_PAUSE) stringreplace(text, "$e", "e");
 
     if(guiInfo.AudioChannels == 0) stringreplace(text, "$a", "n");
     else if(guiInfo.AudioChannels == 1) stringreplace(text, "$a", "m");


More information about the MPlayer-cvslog mailing list