X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Fccbs_bigscreen.cpp;h=fb53775f64e9d35ef194fc2e8554610eeac4df10;hb=81ab2a21cc586b81bc6362c0d48c276515caaf50;hp=527e9c5ab671c6ae33677ed95145456709f82946;hpb=b08df7e9ab564453d6ab238e4c326ad59608479c;p=ccbs diff --git a/bigscreen/ccbs_bigscreen.cpp b/bigscreen/ccbs_bigscreen.cpp index 527e9c5..fb53775 100644 --- a/bigscreen/ccbs_bigscreen.cpp +++ b/bigscreen/ccbs_bigscreen.cpp @@ -39,13 +39,15 @@ void init(pqxx::connection &conn) 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); + std::fprintf(stderr, "tourn: %u round: %u parallel: %u num_machines: %u\n", + i->tournament, i->round, i->parallel, i->num_machines); // memory leaks here? - RotateScreen *rs = new RotateScreen(); - screens.push_back(rs); - rs->add_screen(new GroupScreen(conn, i->tournament, i->round, i->parallel)); + for (unsigned j = 0; j < i->num_machines; ++j) { + RotateScreen *rs = new RotateScreen(); + screens.push_back(rs); + rs->add_screen(new GroupScreen(conn, i->tournament, i->round, i->parallel, j, i->num_machines)); + } } }