Skip to content

Commit

Permalink
Reset prediction engine after size has changed (i.e. after Resize is …
Browse files Browse the repository at this point in the history
…applied)
  • Loading branch information
keithw committed Apr 16, 2012
1 parent 679b819 commit cca925e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/frontend/terminaloverlay.cc
Expand Up @@ -388,6 +388,13 @@ void PredictionEngine::cull( const Framebuffer &fb )
return;
}

if ( (last_height != fb.ds.get_height())
|| (last_width != fb.ds.get_width()) ) {
last_height = fb.ds.get_height();
last_width = fb.ds.get_width();
reset();
}

uint64_t now = timestamp();

/* control srtt_trigger with hysteresis */
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/terminaloverlay.h
Expand Up @@ -191,6 +191,8 @@ namespace Overlay {

unsigned int send_interval;

int last_height, last_width;

public:
enum DisplayPreference {
Always,
Expand Down Expand Up @@ -227,6 +229,7 @@ namespace Overlay {
glitch_trigger( 0 ),
last_quick_confirmation( 0 ),
send_interval( 250 ),
last_height( 0 ), last_width( 0 ),
display_preference( Adaptive )
{
}
Expand Down

0 comments on commit cca925e

Please sign in to comment.