mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 13:07:26 +01:00
parent
f336380b90
commit
b20acc3ed7
8
run.go
8
run.go
@ -296,8 +296,14 @@ func runGame(game Game, scale float64) error {
|
||||
// Ebiten users should NOT call RunGameWithoutMainLoop.
|
||||
// Instead, functions in github.com/hajimehoshi/ebiten/mobile package calls this.
|
||||
func RunGameWithoutMainLoop(game Game) {
|
||||
game = &imageDumperGame{game: game}
|
||||
fixWindowPosition(WindowSize())
|
||||
if _, ok := game.(interface{ Draw(*Image) }); ok {
|
||||
game = &imageDumperGameWithDraw{
|
||||
imageDumperGame: imageDumperGame{game: game},
|
||||
}
|
||||
} else {
|
||||
game = &imageDumperGame{game: game}
|
||||
}
|
||||
theUIContext.set(game, 0)
|
||||
uiDriver().RunWithoutMainLoop(theUIContext)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user