mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
mobile/ebitenmobileview: Remove 'title' argument from Run
This commit is contained in:
parent
c93075d1dc
commit
2925fc718b
@ -14,8 +14,8 @@
|
||||
|
||||
// Package ebitenmobileview offers functions for OpenGL/Metal view of mobiles.
|
||||
//
|
||||
// The functions are not intended for public usages, and there is no guarantee of
|
||||
// backward compatibility.
|
||||
// The functions are not intended for public usages.
|
||||
// There is no guarantee of backward compatibility.
|
||||
package ebitenmobileview
|
||||
|
||||
import (
|
||||
@ -32,14 +32,14 @@ var (
|
||||
mobileMutex sync.Mutex
|
||||
)
|
||||
|
||||
func Run(width, height int, scale float64, title string) {
|
||||
func Run(width, height int, scale float64) {
|
||||
mobileMutex.Lock()
|
||||
defer mobileMutex.Unlock()
|
||||
|
||||
if updateFunc == nil {
|
||||
panic("ebitenmobileview: SetUpdateFunc must be called before Run")
|
||||
}
|
||||
start(updateFunc, width, height, scale, title)
|
||||
start(updateFunc, width, height, scale)
|
||||
}
|
||||
|
||||
func Update() error {
|
||||
|
@ -29,7 +29,7 @@ func update() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func start(f func(*ebiten.Image) error, width, height int, scale float64, title string) {
|
||||
func start(f func(*ebiten.Image) error, width, height int, scale float64) {
|
||||
}
|
||||
|
||||
func updateTouchesOnAndroid(action int, id int, x, y int) {
|
||||
|
@ -46,7 +46,8 @@ func update() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func start(f func(*ebiten.Image) error, width, height int, scale float64, title string) {
|
||||
func start(f func(*ebiten.Image) error, width, height int, scale float64) {
|
||||
running = true
|
||||
chError = ebiten.RunWithoutMainLoop(f, width, height, scale, title)
|
||||
// The last argument 'title' is not used on mobile platforms, so just pass an empty string.
|
||||
chError = ebiten.RunWithoutMainLoop(f, width, height, scale, "")
|
||||
}
|
||||
|
@ -33,10 +33,12 @@ import (
|
||||
//
|
||||
// Start is concurrent-safe.
|
||||
//
|
||||
// The argument title is ignored. This is for backward compatibility.
|
||||
//
|
||||
// Start always returns nil as of 1.5.0-alpha.
|
||||
func Start(f func(*ebiten.Image) error, width, height int, scale float64, title string) error {
|
||||
ebitenmobileview.SetUpdateFunc(f)
|
||||
ebitenmobileview.Run(width, height, scale, title)
|
||||
ebitenmobileview.Run(width, height, scale)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user