aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go
diff options
context:
space:
mode:
authorlawl <github@dumbinter.net>2022-01-06 10:44:13 +0200
committerlawl <github@dumbinter.net>2022-01-06 16:04:34 +0530
commit8c34658b64f1efeab501bef57d2bfa9579fe34e2 (patch)
tree3fef93871214bc85c89ffcd04c6782c8aa3862ce /vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go
parent38787e4195f2a34d7ec4421caf17cb99bc31fa2b (diff)
downloadnoisetorch-8c34658b64f1efeab501bef57d2bfa9579fe34e2.tar.gz
noisetorch-8c34658b64f1efeab501bef57d2bfa9579fe34e2.zip
Chore: Upgrade nucular GUI dependency
Diffstat (limited to 'vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go')
-rw-r--r--vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go
index 3492997..9a135da 100644
--- a/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go
+++ b/vendor/github.com/go-gl/glfw/v3.3/glfw/glfw.go
@@ -34,7 +34,14 @@ const (
// This function may only be called from the main thread.
func Init() error {
C.glfwInit()
- return acceptError(APIUnavailable)
+ // invalidValue can happen when specific joysticks are used. This issue
+ // will be fixed in GLFW 3.3.5. As a temporary fix, ignore this error.
+ // See go-gl/glfw#292, go-gl/glfw#324, and glfw/glfw#1763.
+ err := acceptError(APIUnavailable, invalidValue)
+ if e, ok := err.(*Error); ok && e.Code == invalidValue {
+ return nil
+ }
+ return err
}
// Terminate destroys all remaining windows, frees any allocated resources and
@@ -100,6 +107,7 @@ func GetVersionString() string {
func GetClipboardString() string {
cs := C.glfwGetClipboardString(nil)
if cs == nil {
+ acceptError(FormatUnavailable)
return ""
}
return C.GoString(cs)