mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/graphicsdriver/metal: bug fix: compile error
This commit is contained in:
parent
7998e4d31d
commit
36bd3329b3
@ -39,9 +39,9 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Example_listDevices() {
|
func Example_listDevices() {
|
||||||
device, ok := mtl.CreateSystemDefaultDevice()
|
device, err := mtl.CreateSystemDefaultDevice()
|
||||||
if !ok {
|
if err != nil {
|
||||||
log.Fatalln("Metal is not supported")
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
printJSON("preferred system default Metal device = ", device)
|
printJSON("preferred system default Metal device = ", device)
|
||||||
|
|
||||||
@ -86,9 +86,9 @@ func printJSON(label string, v any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Example_renderTriangle() {
|
func Example_renderTriangle() {
|
||||||
device, ok := mtl.CreateSystemDefaultDevice()
|
device, err := mtl.CreateSystemDefaultDevice()
|
||||||
if !ok {
|
if err != nil {
|
||||||
log.Fatalln("Metal is not supported")
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a render pipeline state.
|
// Create a render pipeline state.
|
||||||
|
@ -30,9 +30,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Disabled_TestRenderTriangle(t *testing.T) {
|
func Disabled_TestRenderTriangle(t *testing.T) {
|
||||||
device, ok := mtl.CreateSystemDefaultDevice()
|
device, err := mtl.CreateSystemDefaultDevice()
|
||||||
if !ok {
|
if err != nil {
|
||||||
t.Fatal("Metal is not supported")
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a render pipeline state.
|
// Create a render pipeline state.
|
||||||
|
Loading…
Reference in New Issue
Block a user