mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/graphicsdriver/metal, internal/graphicsdriver/opengl: change the return type to interface
Converting a nil with a pointer type to an interface type is no longer a nil-nil interface, and then comparing with nil causes an unexpected results.
This commit is contained in:
parent
60e9ff35b2
commit
7bb7e45522
@ -367,7 +367,7 @@ func init() {
|
||||
|
||||
var theGraphics Graphics
|
||||
|
||||
func Get() *Graphics {
|
||||
func Get() graphicsdriver.Graphics {
|
||||
if !isMetalAvailable {
|
||||
return nil
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
|
||||
var theGraphics Graphics
|
||||
|
||||
func Get() *Graphics {
|
||||
func Get() graphicsdriver.Graphics {
|
||||
return &theGraphics
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user