X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Fgroupscreen.cpp;h=ed574ca68be233d41cb1decc9a332f0224e410c8;hp=2827a6af3a111121e515b30db3ee0409820290bd;hb=a8f5648a4186b79c28c0c98f647802fc7ee36af8;hpb=da6c03044674863de9f8a017010aa579b3b27a12 diff --git a/bigscreen/groupscreen.cpp b/bigscreen/groupscreen.cpp index 2827a6a..ed574ca 100644 --- a/bigscreen/groupscreen.cpp +++ b/bigscreen/groupscreen.cpp @@ -3,7 +3,7 @@ #include "fonts.h" GroupScreen::GroupScreen(pqxx::connection &conn, unsigned tournament, unsigned round, unsigned parallel) - : tournament(tournament), round(tournament), parallel(parallel), scores_changed(conn, "scores"), conn(conn), valid(false) + : tournament(tournament), round(round), parallel(parallel), scores_changed(conn, "scores"), conn(conn), valid(false) { } @@ -33,7 +33,14 @@ void GroupScreen::draw(unsigned char *buf) unsigned x = 90; for (std::vector::const_iterator j = i->scores.begin(); j != i->scores.end(); ++j) { - my_draw_text(widestring("1234"), buf, x, y, true, 255, 255, 255); + if (j->score == -1) { + continue; + } + + char text[16]; + sprintf(text, "%u", j->score); + + my_draw_text(text, buf, x, y, true, 255, 255, 255); x += 60; }