# HG changeset patch # User ib # Date 1394727747 0 # Node ID 0dfa0ecb10f4252e7eb445be4cfa347fcf391764 # Parent d41fbe8a87975844849b8bbf09534ec3d9ee819b 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. diff -r d41fbe8a8797 -r 0dfa0ecb10f4 gui/win32/widgetrender.c --- a/gui/win32/widgetrender.c Thu Mar 13 15:51:42 2014 +0000 +++ b/gui/win32/widgetrender.c Thu Mar 13 16:22:27 2014 +0000 @@ -151,12 +151,9 @@ 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");