From bd10f195678f53ca06a453f307ecb57e51971cbd Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 15 Oct 2023 18:32:47 +0900 Subject: [PATCH] Revert "internal/ui: return errors when getting a graphics driver fails" This reverts commit d4e31aedd6a6d2e365655f37a0660c18e089016a. Reason: compile error with -tags=nintendosdk --- internal/ui/ui_android.go | 4 ++-- internal/ui/ui_darwin.go | 2 +- internal/ui/ui_ios.go | 2 +- internal/ui/ui_linbsd.go | 4 ++-- internal/ui/ui_nintendosdk.go | 4 ++-- internal/ui/ui_windows.go | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/ui/ui_android.go b/internal/ui/ui_android.go index 9f5fba691..236d8d40b 100644 --- a/internal/ui/ui_android.go +++ b/internal/ui/ui_android.go @@ -108,11 +108,11 @@ func (g *graphicsDriverCreatorImpl) newOpenGL() (graphicsdriver.Graphics, error) } func (*graphicsDriverCreatorImpl) newDirectX() (graphicsdriver.Graphics, error) { - return nil, fmt.Errorf("ui: DirectX is not supported in this environment") + return nil, nil } func (*graphicsDriverCreatorImpl) newMetal() (graphicsdriver.Graphics, error) { - return nil, fmt.Errorf("ui: Metal is not supported in this environment") + return nil, nil } func deviceScaleFactorImpl() float64 { diff --git a/internal/ui/ui_darwin.go b/internal/ui/ui_darwin.go index ef51750b9..c7716aa58 100644 --- a/internal/ui/ui_darwin.go +++ b/internal/ui/ui_darwin.go @@ -185,7 +185,7 @@ func (*graphicsDriverCreatorImpl) newOpenGL() (graphicsdriver.Graphics, error) { } func (*graphicsDriverCreatorImpl) newDirectX() (graphicsdriver.Graphics, error) { - return nil, fmt.Errorf("ui: DirectX is not supported in this environment") + return nil, nil } func (*graphicsDriverCreatorImpl) newMetal() (graphicsdriver.Graphics, error) { diff --git a/internal/ui/ui_ios.go b/internal/ui/ui_ios.go index 943373ab9..34e9a2b33 100644 --- a/internal/ui/ui_ios.go +++ b/internal/ui/ui_ios.go @@ -55,7 +55,7 @@ func (g *graphicsDriverCreatorImpl) newOpenGL() (graphicsdriver.Graphics, error) } func (*graphicsDriverCreatorImpl) newDirectX() (graphicsdriver.Graphics, error) { - return nil, fmt.Errorf("ui: DirectX is not supported in this environment") + return nil, nil } func (g *graphicsDriverCreatorImpl) newMetal() (graphicsdriver.Graphics, error) { diff --git a/internal/ui/ui_linbsd.go b/internal/ui/ui_linbsd.go index dad836183..e0878df3a 100644 --- a/internal/ui/ui_linbsd.go +++ b/internal/ui/ui_linbsd.go @@ -47,11 +47,11 @@ func (*graphicsDriverCreatorImpl) newOpenGL() (graphicsdriver.Graphics, error) { } func (*graphicsDriverCreatorImpl) newDirectX() (graphicsdriver.Graphics, error) { - return nil, fmt.Errorf("ui: DirectX is not supported in this environment") + return nil, nil } func (*graphicsDriverCreatorImpl) newMetal() (graphicsdriver.Graphics, error) { - return nil, fmt.Errorf("ui: Metal is not supported in this environment") + return nil, nil } // glfwMonitorSizeInGLFWPixels must be called from the main thread. diff --git a/internal/ui/ui_nintendosdk.go b/internal/ui/ui_nintendosdk.go index bc6108857..6da66f999 100644 --- a/internal/ui/ui_nintendosdk.go +++ b/internal/ui/ui_nintendosdk.go @@ -46,11 +46,11 @@ func (*graphicsDriverCreatorImpl) newOpenGL() (graphicsdriver.Graphics, error) { } func (*graphicsDriverCreatorImpl) newDirectX() (graphicsdriver.Graphics, error) { - return nil, fmt.Errorf("ui: DirectX is not supported in this environment") + return nil, nil } func (*graphicsDriverCreatorImpl) newMetal() (graphicsdriver.Graphics, error) { - return nil, fmt.Errorf("ui: Metal is not supported in this environment") + return nil, nil } const deviceScaleFactor = 1 diff --git a/internal/ui/ui_windows.go b/internal/ui/ui_windows.go index 1f2aa7025..9630c579b 100644 --- a/internal/ui/ui_windows.go +++ b/internal/ui/ui_windows.go @@ -86,7 +86,7 @@ func (g *graphicsDriverCreatorImpl) newDirectX() (graphicsdriver.Graphics, error } func (*graphicsDriverCreatorImpl) newMetal() (graphicsdriver.Graphics, error) { - return nil, fmt.Errorf("ui: Metal is not supported in this environment") + return nil, nil } // glfwMonitorSizeInGLFWPixels must be called from the main thread.