X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Frotatescreen.cpp;h=e7d2bd47793e4c92717becc224e875321c917c2b;hb=0fad64f1f8ecc79312e6d27aac1bc0b3feff84c1;hp=4fc9fa0903ff50c7247cd02ecf686908698fc1e1;hpb=09ae4d8636130d4c86ab3f8df8f823482f948f97;p=ccbs diff --git a/bigscreen/rotatescreen.cpp b/bigscreen/rotatescreen.cpp index 4fc9fa0..e7d2bd4 100644 --- a/bigscreen/rotatescreen.cpp +++ b/bigscreen/rotatescreen.cpp @@ -11,7 +11,7 @@ RotateScreen::RotateScreen() RotateScreen::~RotateScreen() { - delete fadefrom_buf; + delete[] fadefrom_buf; } bool RotateScreen::check_invalidated() @@ -166,7 +166,14 @@ bool RotateScreen::needs_update() return (since >= 10.0); } -// hold all screens for minimum three seconds, hold all screens with new info for at minimum eight seconds +/* + * Hold all screens for minimum three seconds, hold all screens with new info + * for at minimum eight seconds. There's a slight hack here; a screen with new + * info _might_ already be outdated (for instance, if we do an update to a group + * with a mistake, then correct it quick afterwards). If it's already outdated, + * we ignore the "eight second" rule; the results will be somewhat ugly, though, + * but it's hard to do much better without too much special code. + */ bool RotateScreen::can_update() { struct timeval now; @@ -177,7 +184,7 @@ bool RotateScreen::can_update() if (since < 3.0) return false; - if (fade_to_new_info && since < 8.0) + if (fade_to_new_info && subscreens.size() > 0 && !subscreens[current_screen].screen->check_invalidated() && since < 8.0) return false; return true; }