X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Fgroupscreen.cpp;h=88fce1cc03606f527cce3c12158cd641c2956466;hb=6bd21f38c6a860ba75ea98f2404c83d9bd55498a;hp=b2a63159540810fcd1f3d6be6202fc3b44d735e2;hpb=51e6903f55674443aad56235dcfb74f334c401e8;p=ccbs diff --git a/bigscreen/groupscreen.cpp b/bigscreen/groupscreen.cpp index b2a6315..88fce1c 100644 --- a/bigscreen/groupscreen.cpp +++ b/bigscreen/groupscreen.cpp @@ -27,13 +27,12 @@ bool GroupScreen::check_invalidated() return true; if (!scores_changed.get_flag()) return false; + scores_changed.reset_flag(); bool needs_update; conn.perform(FetchNeedsUpdate(last_updated, tournament, round, parallel, &needs_update)); - if (!needs_update) - scores_changed.reset_flag(); - + valid = !needs_update; return needs_update; } @@ -198,7 +197,7 @@ void GroupScreen::find_column_widths(const Group &group, std::vector & for (unsigned i = 0; i <= num_scores + 2; ++i) sumcolwidth += colwidth[i] + 20; - if (sumcolwidth < 780) + if (sumcolwidth < LOGICAL_SCREEN_WIDTH - 20) break; if (mode == 0) { @@ -210,7 +209,7 @@ void GroupScreen::find_column_widths(const Group &group, std::vector & * If we have space to go, distribute as much as we can to the chosen song column, so we won't have * total and rank jumping around. */ - if (sumcolwidth < 780) { + if (sumcolwidth < LOGICAL_SCREEN_WIDTH - 20) { int first_chosen_col = -1; unsigned col = 1; @@ -222,7 +221,7 @@ void GroupScreen::find_column_widths(const Group &group, std::vector & } if (first_chosen_col != -1) { - colwidth[first_chosen_col] += 780 - sumcolwidth; + colwidth[first_chosen_col] += LOGICAL_SCREEN_WIDTH - 20 - sumcolwidth; } } }