mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
parent
8fae2e1c18
commit
9fe4191a6a
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