浏览代码

Merge pull request #4860 from marler8997/fixDivide0

Avoid divide by 0 in core_custom_frame_control example
pull/4862/head
Ray 1周前
committed by GitHub
父节点
当前提交
001e78014c
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      examples/core/core_custom_frame_control.c

+ 4
- 1
examples/core/core_custom_frame_control.c 查看文件

@ -95,7 +95,10 @@ int main(void)
DrawText("PRESS SPACE to PAUSE MOVEMENT", 10, GetScreenHeight() - 60, 20, GRAY);
DrawText("PRESS UP | DOWN to CHANGE TARGET FPS", 10, GetScreenHeight() - 30, 20, GRAY);
DrawText(TextFormat("TARGET FPS: %i", targetFPS), GetScreenWidth() - 220, 10, 20, LIME);
DrawText(TextFormat("CURRENT FPS: %i", (int)(1.0f/deltaTime)), GetScreenWidth() - 220, 40, 20, GREEN);
if (deltaTime != 0)
{
DrawText(TextFormat("CURRENT FPS: %i", (int)(1.0f/deltaTime)), GetScreenWidth() - 220, 40, 20, GREEN);
}
EndDrawing();

正在加载...
取消
保存