X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Fccbs_bigscreen.cpp;h=f50991212b4257bc323c01b3413b81f98ea2992f;hp=9db87c8f9be0f9024c344ef2ea502a2b1ca2adab;hb=f40fa6f12fb246c09e925e97bcd7c40f8d2fa59c;hpb=8970b43d021e65f07ed4d279185c5062b4f9ee4a diff --git a/bigscreen/ccbs_bigscreen.cpp b/bigscreen/ccbs_bigscreen.cpp index 9db87c8..f509912 100644 --- a/bigscreen/ccbs_bigscreen.cpp +++ b/bigscreen/ccbs_bigscreen.cpp @@ -8,10 +8,11 @@ #include "widestring.h" #include "fetch_current_tournament.h" #include "fetch_list_of_active_groups.h" +#include "fetch_group.h" #include "fonts.h" Tournament active_tournament; -std::vector active_groups; +std::vector active_groups; unsigned char framebuf[800 * 600 * 4]; void init(pqxx::connection &conn) @@ -24,9 +25,13 @@ void init(pqxx::connection &conn) } else { 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) { + 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); + + Group gr; + conn.perform(FetchGroup(i->tournament, i->round, i->parallel, &gr)); + std::fprintf(stderr, "%u players in group\n", gr.players.size()); } } }