Ignore:
Timestamp:
May 15, 2009, 11:48:31 AM (11 years ago)
Author:
Pascal Terjan
Message:
  • Do not lower refresh rate under 5 times per second
File:
1 edited

Legend:

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

    r3457 r3459  
    200200                    else
    201201                    {
    202                         debug("Got %d more bytes", lb);
    203202                        l2 += lb;
    204203                        l = caca_import_memory(screen_list->cv, buf, l2, "caca");
     
    210209                debug("refreshtime=%dms (limit %d, requested %d)", dt/1000, screen_list->delay, screen_list->requested_delay);
    211210                /* Adjust refresh delay so that the server do not compute useless things */
    212                 if(dt > 2*1000*screen_list->delay)
     211                if(dt > 2*1000*screen_list->delay && screen_list->delay <= 100)
    213212                {
    214213                    screen_list->delay*=2;
    215214                    send_delay(screen_list);
    216215                }
    217                 else if(dt < screen_list->delay*1000/2 &&
    218                         screen_list->delay >= 2*screen_list->requested_delay)
     216                else if(dt < screen_list->delay*1000*1.2 &&
     217                        screen_list->delay >= 3*screen_list->requested_delay/2)
    219218                {
    220                     screen_list->delay/=2;
     219                    screen_list->delay=2*screen_list->delay/3;
    221220                    send_delay(screen_list);
    222221                }
Note: See TracChangeset for help on using the changeset viewer.