mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
ui: Change the threshold to determine if the running is busy
This commit is contained in:
parent
db2a43217e
commit
522b7370a4
6
run.go
6
run.go
@ -106,9 +106,9 @@ func Run(f func(*Image) error, width, height, scale int, title string) error {
|
||||
if int64(5*time.Second/60) < now-beforeForUpdate {
|
||||
beforeForUpdate = now
|
||||
} else {
|
||||
c := int((now - beforeForUpdate) * 60 / int64(time.Second))
|
||||
runContext.isRunningSlowly = c >= 2
|
||||
for i := 0; i < c; i++ {
|
||||
c := float64(now-beforeForUpdate) * 60 / float64(time.Second)
|
||||
runContext.isRunningSlowly = c >= 2.5
|
||||
for i := 0; i < int(c); i++ {
|
||||
if err := ui.DoEvents(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user