소스 검색

Fixed presentation reset calculation (thanks @zturtleman!)

Sam Lantinga 3 년 전
부모
커밋
f32cdfa096
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/render/SDL_render.c

+ 1 - 1
src/render/SDL_render.c

@@ -4205,7 +4205,7 @@ static void SDL_RenderSimulateVSync(SDL_Renderer *renderer)
     }
 
     elapsed = (now - renderer->last_present);
-    if (!renderer->last_present || elapsed > SDL_NS_TO_MS(1000)) {
+    if (!renderer->last_present || elapsed > SDL_MS_TO_NS(1000)) {
         /* It's been too long, reset the presentation timeline */
         renderer->last_present = now;
     } else {