]> git.sesse.net Git - ccbs/blobdiff - bigscreen/top10scorescreen.cpp
Make backgrounded invalidated screens less database-noisy.
[ccbs] / bigscreen / top10scorescreen.cpp
index f756447243dee4f49f69a9992726a81ea6770d07..672a906d9fd5261e011f58ec60beb8384c208304 100644 (file)
@@ -26,6 +26,7 @@ bool Top10ScoreScreen::check_invalidated()
                return true;
        if (!scores_changed.get_flag())
                return false;
                return true;
        if (!scores_changed.get_flag())
                return false;
+       scores_changed.reset_flag();
 
        // check that there are indeed changes, otherwise don't bother
        std::vector<TopScore> scores;
 
        // check that there are indeed changes, otherwise don't bother
        std::vector<TopScore> scores;
@@ -33,10 +34,11 @@ bool Top10ScoreScreen::check_invalidated()
        
        for (std::vector<TopScore>::const_iterator i = scores.begin(); i != scores.end(); ++i) {
                if (seen_topscore.count(*i) == 0) {
        
        for (std::vector<TopScore>::const_iterator i = scores.begin(); i != scores.end(); ++i) {
                if (seen_topscore.count(*i) == 0) {
+                       valid = false;
                        return true;
                }
        }
                        return true;
                }
        }
-       
+
        return false;
 }
 
        return false;
 }