-display the music information only once if just one song exist

This commit is contained in:
fix94.1 2013-02-23 17:41:26 +00:00
parent f96d478fcb
commit dbfbf30e61
3 changed files with 3 additions and 0 deletions

View File

@ -2024,6 +2024,7 @@ void CMenu::_mainLoopCommon(bool withCF, bool adjusting)
{ {
MusicPlayer.DisplayTime = 0; MusicPlayer.DisplayTime = 0;
m_btnMgr.hide(m_mainLblCurMusic); m_btnMgr.hide(m_mainLblCurMusic);
if(MusicPlayer.OneSong) m_music_info = false;
} }
//Take Screenshot //Take Screenshot

View File

@ -61,6 +61,7 @@ void Musicplayer::Init(Config &cfg, const string& musicDir, const string& themeM
srand(unsigned(time(NULL))); srand(unsigned(time(NULL)));
random_shuffle(FileNames.begin(), FileNames.end()); random_shuffle(FileNames.begin(), FileNames.end());
} }
OneSong = (FileNames.size() == 1);
CurrentFileName = FileNames.begin(); CurrentFileName = FileNames.begin();
} }

View File

@ -46,6 +46,7 @@ public:
wstringEx GetFileName(); wstringEx GetFileName();
bool SongChanged(); bool SongChanged();
time_t DisplayTime; time_t DisplayTime;
bool OneSong;
protected: protected:
bool PosFromPrevFile(); bool PosFromPrevFile();
void LoadCurrentFile(); void LoadCurrentFile();