X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Fccbs_bigscreen.cpp;h=d28a56fcef2a7707642803ecc9b9e2b2178fead9;hp=2114093f36c8164f44d4afabba97145d5799dd13;hb=f0955c93464993b82d087f48150d363c6c57054f;hpb=ef3e9f27177227a0f412e6f9995212b36bf27f19 diff --git a/bigscreen/ccbs_bigscreen.cpp b/bigscreen/ccbs_bigscreen.cpp index 2114093..d28a56f 100644 --- a/bigscreen/ccbs_bigscreen.cpp +++ b/bigscreen/ccbs_bigscreen.cpp @@ -12,6 +12,7 @@ #include "fonts.h" #include "groupscreen.h" #include "splitscreen.h" +#include "rotatescreen.h" Tournament active_tournament; std::vector active_groups; @@ -40,7 +41,10 @@ void init(pqxx::connection &conn) std::fprintf(stderr, "tourn: %u round: %u parallel: %u\n", i->tournament, i->round, i->parallel); - screens.push_back(new GroupScreen(conn, i->tournament, i->round, i->parallel)); + // memory leaks here? + RotateScreen *rs = new RotateScreen(); + screens.push_back(rs); + rs->add_screen(new GroupScreen(conn, i->tournament, i->round, i->parallel)); } } @@ -63,10 +67,12 @@ void main_loop(pqxx::connection &conn) if (mainscreen->check_invalidated()) { mainscreen->draw(framebuf); + ptc_update(framebuf); + conn.await_notification(0, 10000); + } else { + ptc_update(framebuf); + conn.await_notification(0, 200000); } - ptc_update(framebuf); - - conn.await_notification(0, 50000); } int main(int argc, char **argv)