mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
ui: Refactoring: Simplify the run loop
This commit is contained in:
parent
49a0fc839e
commit
41fae3214b
6
run.go
6
run.go
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user