Changeset 3455 for neercs/trunk


Ignore:
Timestamp:
May 14, 2009, 5:27:48 PM (11 years ago)
Author:
Pascal Terjan
Message:
  • Don't refresh more than 60 times per second
Location:
neercs/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/attach.c

    r3446 r3455  
    387387            if(!screen_list->dp)
    388388                return;
     389            caca_set_display_time(screen_list->dp, screen_list->delay);
    389390            caca_set_cursor(screen_list->dp, 1);
    390391
  • neercs/trunk/src/main.c

    r3445 r3455  
    206206                fcntl(screen_list->socket[SOCK_CLIENT], F_SETFL, O_NONBLOCK);
    207207                caca_refresh_display(screen_list->dp);
     208                debug("refreshtime=%d", caca_get_display_time(screen_list->dp));
    208209            }
    209210            else if(!strncmp("CURSOR ", buf, 7))
     
    337338    screen_list->wm_type = WM_VSPLIT;
    338339    screen_list->in_bell = 0;
     340    screen_list->changed = 0;
     341    screen_list->delay = 1000000/60; /* Don't refresh more than 60 times per second */
    339342    screen_list->pty = screen_list->prevpty = 0;
    340343    screen_list->dont_update_coords = 0;
  • neercs/trunk/src/neercs.h

    r3453 r3455  
    152152    int dont_update_coords;      /* Used by recurrents */
    153153    int changed;                 /* Global redraw needed (e.g. adding a screen) */
     154    int delay;                   /* Minimal time between two refresh (ms) */
    154155
    155156    /* Detaching */
  • neercs/trunk/src/server.c

    r3453 r3455  
    507507    screen_list->cv = caca_create_canvas(0, 0);
    508508    screen_list->dp = caca_create_display(screen_list->cv);
     509    caca_set_display_time(screen_list->dp, screen_list->delay);
     510
    509511    if(!screen_list->dp)
    510512        return -3;
Note: See TracChangeset for help on using the changeset viewer.