mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
Revert "internal/ui: use errors.New instead of fmt.Errorf"
This reverts commit ed49d8cc9a
.
Reason: compile error
This commit is contained in:
parent
ed49d8cc9a
commit
565e944691
@ -85,7 +85,6 @@ static float deviceScale(uintptr_t java_vm, uintptr_t jni_env, uintptr_t ctx) {
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"golang.org/x/mobile/app"
|
||||
@ -109,11 +108,11 @@ func (g *graphicsDriverCreatorImpl) newOpenGL() (graphicsdriver.Graphics, error)
|
||||
}
|
||||
|
||||
func (*graphicsDriverCreatorImpl) newDirectX() (graphicsdriver.Graphics, error) {
|
||||
return nil, errors.Errorf("ui: DirectX is not supported in this environment")
|
||||
return nil, fmt.Errorf("ui: DirectX is not supported in this environment")
|
||||
}
|
||||
|
||||
func (*graphicsDriverCreatorImpl) newMetal() (graphicsdriver.Graphics, error) {
|
||||
return nil, errors.Errorf("ui: Metal is not supported in this environment")
|
||||
return nil, fmt.Errorf("ui: Metal is not supported in this environment")
|
||||
}
|
||||
|
||||
func deviceScaleFactorImpl() float64 {
|
||||
|
@ -25,7 +25,6 @@ package ui
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"golang.org/x/mobile/gl"
|
||||
@ -56,12 +55,12 @@ func (g *graphicsDriverCreatorImpl) newOpenGL() (graphicsdriver.Graphics, error)
|
||||
}
|
||||
|
||||
func (*graphicsDriverCreatorImpl) newDirectX() (graphicsdriver.Graphics, error) {
|
||||
return nil, errors.Errorf("ui: DirectX is not supported in this environment")
|
||||
return nil, fmt.Errorf("ui: DirectX is not supported in this environment")
|
||||
}
|
||||
|
||||
func (g *graphicsDriverCreatorImpl) newMetal() (graphicsdriver.Graphics, error) {
|
||||
if g.gomobileContext != nil {
|
||||
return nil, errors.Errorf("ui: Metal is not available with gomobile-build")
|
||||
return nil, fmt.Errorf("ui: Metal is not available with gomobile-build")
|
||||
}
|
||||
return metal.NewGraphics()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user