fix statusbar scrolling speed with idle mode and bitrate displayed

with this combination scrolling was twice as fast as it should be.
This commit is contained in:
Andrzej Rybczak
2010-04-30 01:47:47 +02:00
parent d77f0fd2a2
commit b6e6ab1f61

View File

@@ -138,10 +138,6 @@ void TraceMpdStatus()
gettimeofday(&Global::Timer, 0); gettimeofday(&Global::Timer, 0);
if (Mpd.Connected() && (Mpd.SupportsIdle() || Timer.tv_sec > past.tv_sec || Global::UpdateStatusImmediately)) if (Mpd.Connected() && (Mpd.SupportsIdle() || Timer.tv_sec > past.tv_sec || Global::UpdateStatusImmediately))
{ {
Mpd.UpdateStatus();
Global::BlockItemListUpdate = 0;
Playlist::BlockUpdate = 0;
Global::UpdateStatusImmediately = 0;
if (!Mpd.SupportsIdle()) if (!Mpd.SupportsIdle())
{ {
gettimeofday(&past, 0); gettimeofday(&past, 0);
@@ -154,6 +150,10 @@ void TraceMpdStatus()
Mpd.OrderDataFetching(); Mpd.OrderDataFetching();
gettimeofday(&past, 0); gettimeofday(&past, 0);
} }
Mpd.UpdateStatus();
Global::BlockItemListUpdate = 0;
Playlist::BlockUpdate = 0;
Global::UpdateStatusImmediately = 0;
} }
myScreen->Update(); myScreen->Update();