瀏覽代碼

Fix regression that was causing video stuttering (#2503)

pull/2504/head
flashback-fx 3 年之前
committed by GitHub
父節點
當前提交
cda89ebb58
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 2 行新增5 行删除
  1. +2
    -5
      src/rcore.c

+ 2
- 5
src/rcore.c 查看文件

@ -4834,6 +4834,7 @@ void WaitTime(float ms)
while ((currentTime - previousTime) < ms/1000.0f) currentTime = GetTime();
#else
#if defined(SUPPORT_PARTIALBUSY_WAIT_LOOP)
double destTime = GetTime() + ms/1000.0f;
double busyWait = ms*0.05; // NOTE: We are using a busy wait of 5% of the time
ms -= (float)busyWait;
#endif
@ -4857,11 +4858,7 @@ void WaitTime(float ms)
#endif
#if defined(SUPPORT_PARTIALBUSY_WAIT_LOOP)
double previousTime = GetTime();
double currentTime = 0.0;
// Partial busy wait loop (only a fraction of the total wait time)
while ((currentTime - previousTime) < (busyWait/1000.0f)) currentTime = GetTime();
while (GetTime() < destTime) { }
#endif
#endif
}

Loading…
取消
儲存