loop: Bug fix: wrong updating |lastUpdated|

This commit is contained in:
Hajime Hoshi 2017-08-05 23:31:10 +09:00
parent 6f606c6bb1
commit d99638d34c

View File

@ -102,7 +102,7 @@ func (c *runContext) updateCount(now int64) int {
if t > 5*int64(time.Second)/int64(FPS) {
// The previous time is too old. Let's assume that the window was unfocused.
count = 0
c.lastUpdated = now
sync = true
} else {
count = int(t * int64(FPS) / int64(time.Second))
}