mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
ui: Fix comment
This commit is contained in:
parent
e0a091194e
commit
b9752ce97c
5
run.go
5
run.go
@ -199,12 +199,11 @@ func Run(f func(*Image) error, width, height, scale int, title string) error {
|
|||||||
currentRunContext.setRunningSlowly(false)
|
currentRunContext.setRunningSlowly(false)
|
||||||
beforeForUpdate = now
|
beforeForUpdate = now
|
||||||
} else {
|
} else {
|
||||||
// Note that generally t is a little more than 1/60[sec].
|
// Note that generally t is a little different from 1/60[sec].
|
||||||
t := now - beforeForUpdate
|
t := now - beforeForUpdate
|
||||||
currentRunContext.setRunningSlowly(t*FPS >= int64(time.Second*5/2))
|
currentRunContext.setRunningSlowly(t*FPS >= int64(time.Second*5/2))
|
||||||
tt := int(t * FPS / int64(time.Second))
|
tt := int(t * FPS / int64(time.Second))
|
||||||
// As t is not accurate 1/60[sec], errors are accumulated
|
// As t is not accurate 1/60[sec], errors are accumulated.
|
||||||
// (generally, errors are positive values).
|
|
||||||
// To make the FPS stable, set tt 1 if t is a little less than 1/60[sec].
|
// To make the FPS stable, set tt 1 if t is a little less than 1/60[sec].
|
||||||
if tt == 0 && (int64(time.Second)/FPS-int64(5*time.Millisecond)) < t {
|
if tt == 0 && (int64(time.Second)/FPS-int64(5*time.Millisecond)) < t {
|
||||||
tt = 1
|
tt = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user