diff --git a/internal/igwrap/glfw.go b/internal/igwrap/glfw.go index 9f6ee11..e843d86 100644 --- a/internal/igwrap/glfw.go +++ b/internal/igwrap/glfw.go @@ -38,7 +38,11 @@ func NewFrame() { io.SetDisplaySize(imgui.Vec2{X: float32(dsx), Y: float32(dsy)}) now := time.Now() - io.SetDeltaTime(float32(time.Since(lastframe).Seconds())) + deltaTime := float32(time.Since(lastframe).Seconds()) + if deltaTime <= 0.0 { + deltaTime = 1e-6 + } + io.SetDeltaTime(deltaTime) lastframe = now if win.GetAttrib(glfw.Focused) != 0 {