Ignore:
Timestamp:
May 14, 2009, 6:16:41 PM (12 years ago)
Author:
Pascal Terjan
Message:
  • Adapt refresh rate dynamically and inform the server about it
File:
1 edited

Legend:

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

    r3456 r3457  
    177177int request_attach(struct screen_list* screen_list)
    178178{
    179     char buf[32];
     179    char buf[41];
    180180    int bytes;
    181181
    182     bytes = snprintf(buf, sizeof(buf)-1, "ATTACH %10d%c%10d",
     182    bytes = snprintf(buf, sizeof(buf)-1, "ATTACH %10d %10d %10d",
    183183                     caca_get_canvas_width(screen_list->cv),
    184                      ' ',
    185                      caca_get_canvas_height(screen_list->cv));
     184                     caca_get_canvas_height(screen_list->cv),
     185                     screen_list->delay);
    186186    buf[bytes] = '\0';
    187187    debug("Requesting attach: %s", buf);
     
    445445}
    446446
     447int send_delay(struct screen_list* screen_list)
     448{
     449    char buf[18];
     450    int bytes;
     451    bytes = snprintf(buf, sizeof(buf)-1, "DELAY %10d", screen_list->delay);
     452    buf[bytes] = '\0';
     453    return write(screen_list->socket[SOCK_SERVER], buf, strlen(buf)) <= 0;
     454}
Note: See TracChangeset for help on using the changeset viewer.