fixed: reset scroll offset when song changed

This commit is contained in:
Bob van Loosen 2012-12-19 23:29:41 +01:00
parent e91398d77b
commit 1c819b3b41
3 changed files with 19 additions and 5 deletions

View file

@ -334,7 +334,11 @@ void CBitVis::SendData(int64_t time)
//add an empty line
data.SetData(text, m_nrcolumns / 4, true);
SetText(text, m_mpdclient->CurrentSong().c_str());
string currentsong;
if (m_mpdclient->CurrentSong(currentsong))
m_scrolloffset = m_nrcolumns;
SetText(text, currentsong.c_str());
data.SetData(text, sizeof(text), true);
uint8_t end[10];