mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-13 22:47:26 +01:00
internal/ui: refactoring: reduce functions
This commit is contained in:
parent
18714e22a1
commit
742f3a6dac
@ -66,14 +66,6 @@ func (g *graphicsDriverCreatorImpl) newMetal() (graphicsdriver.Graphics, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) SetUIView(uiview uintptr) error {
|
func (u *UserInterface) SetUIView(uiview uintptr) error {
|
||||||
return u.setUIView(uiview)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (u *UserInterface) IsGL() (bool, error) {
|
|
||||||
return u.isGL()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (u *UserInterface) setUIView(uiview uintptr) error {
|
|
||||||
select {
|
select {
|
||||||
case err := <-u.errCh:
|
case err := <-u.errCh:
|
||||||
return err
|
return err
|
||||||
@ -87,7 +79,7 @@ func (u *UserInterface) setUIView(uiview uintptr) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) isGL() (bool, error) {
|
func (u *UserInterface) IsGL() (bool, error) {
|
||||||
select {
|
select {
|
||||||
case err := <-u.errCh:
|
case err := <-u.errCh:
|
||||||
return false, err
|
return false, err
|
||||||
|
Loading…
Reference in New Issue
Block a user