if (!scores_changed.get_flag())
return false;
- return true;
+ // check that there are indeed changes, otherwise don't bother
+ std::vector<TopScore> scores;
+ conn.perform(FetchTopScoresForTournament(tournament, 10, &scores));
+
+ for (std::vector<TopScore>::const_iterator i = scores.begin(); i != scores.end(); ++i) {
+ if (seen_topscore.count(*i) == 0) {
+ return true;
+ }
+ }
+
+ return false;
}
void Top10ScoreScreen::draw(unsigned char *buf)
if (!scores_changed.get_flag())
return false;
- return true;
+ // check that there are indeed changes, otherwise don't bother
+ std::vector<TopChosen> scores;
+ conn.perform(FetchTopChosenSongsForTournament(tournament, 5, &scores));
+
+ for (std::vector<TopChosen>::const_iterator i = scores.begin(); i != scores.end(); ++i) {
+ if (seen_topchosen.count(*i) == 0) {
+ return true;
+ }
+ }
+
+ return false;
}
void Top5ChosenScreen::draw(unsigned char *buf)