ui: Refactoring: Simplify the run loop

This commit is contained in:
Hajime Hoshi 2016-05-18 00:15:38 +09:00
parent 49a0fc839e
commit 41fae3214b

6
run.go
View File

@ -230,12 +230,6 @@ func run(f func(*Image) error, width, height, scale int, title string) error {
tt = 1
}
for i := 0; i < tt; i++ {
if err := ui.CurrentUI().DoEvents(); err != nil {
return err
}
if ui.CurrentUI().IsClosed() {
return nil
}
if err := graphicsContext.update(f); err != nil {
return err
}