mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
run: Take View ID for Android
This commit is contained in:
parent
4254e7b70e
commit
dd210a3ed1
@ -33,6 +33,6 @@ import (
|
|||||||
|
|
||||||
type EventDispatcher mobile.EventDispatcher
|
type EventDispatcher mobile.EventDispatcher
|
||||||
|
|
||||||
func Start() (EventDispatcher, error) {
|
func Start(viewID int) (EventDispatcher, error) {
|
||||||
return mobile.Start(example.Update, example.ScreenWidth, example.ScreenHeight, 2, "Mobile (Ebiten Demo)")
|
return mobile.Start(example.Update, example.ScreenWidth, example.ScreenHeight, 2, "Mobile (Ebiten Demo)", viewID)
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ type EventDispatcher interface {
|
|||||||
// Start starts the game and returns immediately.
|
// Start starts the game and returns immediately.
|
||||||
//
|
//
|
||||||
// Different from ebiten.Run, this invokes only the game loop and not the main (UI) loop.
|
// Different from ebiten.Run, this invokes only the game loop and not the main (UI) loop.
|
||||||
func Start(f func(*ebiten.Image) error, width, height, scale int, title string) (EventDispatcher, error) {
|
func Start(f func(*ebiten.Image) error, width, height, scale int, title string, viewID int) (EventDispatcher, error) {
|
||||||
chError = ebiten.RunWithoutMainLoop(f, width, height, scale, title)
|
chError = ebiten.RunWithoutMainLoop(f, width, height, scale, title)
|
||||||
return &eventDispatcher{}, nil
|
return &eventDispatcher{}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user