소스 검색

* src/graphics.c:

+ Fixed a bug that caused an infinite loop if the delay between two
      caca_refresh() calls was greater than 2000 seconds (or something).
tags/v0.99.beta14
Sam Hocevar sam 21 년 전
부모
커밋
53736c2c85
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. +10
    -1
      src/graphics.c

+ 10
- 1
src/graphics.c 파일 보기

@@ -819,7 +819,16 @@ static unsigned int _caca_getticks(void)

if(last_sec != 0)
{
ticks = (tv.tv_sec - last_sec) * 1000000 + (tv.tv_usec - last_usec);
/* If the delay was greater than 60 seconds, return 10 seconds
* otherwise we may overflow our ticks counter. */
if(tv.tv_sec >= last_sec + 60)
ticks = 60 * 1000000;
else
{
ticks = (tv.tv_sec - last_sec) * 1000000;
ticks += tv.tv_usec;
ticks -= last_usec;
}
}

last_sec = tv.tv_sec;


불러오는 중...
취소
저장