X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Fccbs_bigscreen.cpp;h=9db87c8f9be0f9024c344ef2ea502a2b1ca2adab;hb=44f3ad694f8fe5dd76602d30c9bc1f3de9650f97;hp=c233f4726742169f2706470bb199e011d8448a17;hpb=c582866b27054fcbce6fcde40dbec73c7ae9d91d;p=ccbs diff --git a/bigscreen/ccbs_bigscreen.cpp b/bigscreen/ccbs_bigscreen.cpp index c233f47..9db87c8 100644 --- a/bigscreen/ccbs_bigscreen.cpp +++ b/bigscreen/ccbs_bigscreen.cpp @@ -7,20 +7,27 @@ #include "flagtrigger.h" #include "widestring.h" #include "fetch_current_tournament.h" +#include "fetch_list_of_active_groups.h" #include "fonts.h" Tournament active_tournament; +std::vector active_groups; unsigned char framebuf[800 * 600 * 4]; void init(pqxx::connection &conn) { conn.perform(FetchCurrentTournament(&active_tournament)); + conn.perform(FetchListOfActiveGroups(&active_groups)); if (active_tournament.id == -1) { std::fprintf(stderr, "No active tournament\n"); } else { - std::fprintf(stderr, "Current tournament is %d (name: '%s')\n", - active_tournament.id, active_tournament.name.c_str()); + std::fprintf(stderr, "Current tournament is %d\n", active_tournament.id); + + for (std::vector::const_iterator i = active_groups.begin(); i != active_groups.end(); ++i) { + std::fprintf(stderr, "tourn: %u round: %u parallel: %u\n", + i->tournament, i->round, i->parallel); + } } }