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)
std::sprintf(str, "%u", i->frequency);
width = my_draw_text(str, NULL, 24.0);
- my_draw_text(str, buf, 24.0, 728 - width/2, y, r, g, b);
+ my_draw_text(str, buf, 24.0, 745 - width/2, y, r, g, b);
y += 40;
}