diff --git a/internal/driver/ui.go b/internal/driver/ui.go index 87b22e93b..04772e860 100644 --- a/internal/driver/ui.go +++ b/internal/driver/ui.go @@ -31,7 +31,7 @@ type UIContext interface { var RegularTermination = errors.New("regular termination") type UI interface { - Run(width, height int, scale float64, title string, context UIContext, graphics Graphics) error + Run(title string, context UIContext, graphics Graphics) error RunWithoutMainLoop(width, height int, scale float64, title string, context UIContext, graphics Graphics) <-chan error DeviceScaleFactor() float64 diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index b56a12991..260a5e081 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -554,7 +554,7 @@ func init() { runtime.LockOSThread() } -func (u *UserInterface) Run(width, height int, scale float64, title string, uicontext driver.UIContext, graphics driver.Graphics) error { +func (u *UserInterface) Run(title string, uicontext driver.UIContext, graphics driver.Graphics) error { // Initialize the main thread first so the thread is available at u.run (#809). u.t = thread.New() u.graphics = graphics diff --git a/internal/uidriver/js/ui.go b/internal/uidriver/js/ui.go index fc7912857..63b3da7d3 100644 --- a/internal/uidriver/js/ui.go +++ b/internal/uidriver/js/ui.go @@ -403,7 +403,7 @@ func init() { })) } -func (u *UserInterface) Run(width, height int, scale float64, title string, context driver.UIContext, graphics driver.Graphics) error { +func (u *UserInterface) Run(title string, context driver.UIContext, graphics driver.Graphics) error { document.Set("title", title) canvas.Call("focus") u.running = true diff --git a/internal/uidriver/mobile/ui.go b/internal/uidriver/mobile/ui.go index b6e0d8040..0fbeceaa8 100644 --- a/internal/uidriver/mobile/ui.go +++ b/internal/uidriver/mobile/ui.go @@ -183,7 +183,7 @@ func (u *UserInterface) appMain(a app.App) { } } -func (u *UserInterface) Run(width, height int, scale float64, title string, context driver.UIContext, graphics driver.Graphics) error { +func (u *UserInterface) Run(title string, context driver.UIContext, graphics driver.Graphics) error { // TODO: Remove width/height/scale arguments. They are not used from gomobile-build. u.setGBuildSizeCh = make(chan struct{}) diff --git a/run.go b/run.go index fb81f9a8e..eb9023a80 100644 --- a/run.go +++ b/run.go @@ -157,7 +157,7 @@ func Run(f func(*Image) error, width, height int, scale float64, title string) e theUIContext = newUIContext(game, scale) fixWindowPosition(int(float64(width)*scale), int(float64(height)*scale)) - if err := uiDriver().Run(width, height, scale, title, theUIContext, graphicsDriver()); err != nil { + if err := uiDriver().Run(title, theUIContext, graphicsDriver()); err != nil { if err == driver.RegularTermination { return nil }