mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
ui: Remove theUIContext, which is not used anywhere
This commit is contained in:
parent
725cc22200
commit
3c51ee0991
6
run.go
6
run.go
@ -86,8 +86,6 @@ func IsRunningSlowly() bool {
|
|||||||
return IsDrawingSkipped()
|
return IsDrawingSkipped()
|
||||||
}
|
}
|
||||||
|
|
||||||
var theUIContext atomic.Value
|
|
||||||
|
|
||||||
// Run runs the game.
|
// Run runs the game.
|
||||||
// f is a function which is called at every frame.
|
// f is a function which is called at every frame.
|
||||||
// The argument (*Image) is the render target that represents the screen.
|
// The argument (*Image) is the render target that represents the screen.
|
||||||
@ -136,8 +134,6 @@ func Run(f func(*Image) error, width, height int, scale float64, title string) e
|
|||||||
f = (&imageDumper{f: f}).update
|
f = (&imageDumper{f: f}).update
|
||||||
|
|
||||||
c := newUIContext(f)
|
c := newUIContext(f)
|
||||||
theUIContext.Store(c)
|
|
||||||
|
|
||||||
if err := uiDriver().Run(width, height, scale, title, c, graphicsDriver()); err != nil {
|
if err := uiDriver().Run(width, height, scale, title, c, graphicsDriver()); err != nil {
|
||||||
if err == driver.RegularTermination {
|
if err == driver.RegularTermination {
|
||||||
return nil
|
return nil
|
||||||
@ -157,8 +153,6 @@ func RunWithoutMainLoop(f func(*Image) error, width, height int, scale float64,
|
|||||||
f = (&imageDumper{f: f}).update
|
f = (&imageDumper{f: f}).update
|
||||||
|
|
||||||
c := newUIContext(f)
|
c := newUIContext(f)
|
||||||
theUIContext.Store(c)
|
|
||||||
|
|
||||||
return uiDriver().RunWithoutMainLoop(width, height, scale, title, c, graphicsDriver())
|
return uiDriver().RunWithoutMainLoop(width, height, scale, title, c, graphicsDriver())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user