From c6dd34933811d0e8e36f800d78d901b5c5931c18 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 9 Aug 2021 03:40:29 +0900 Subject: [PATCH] internal/glfw: Refactoring --- internal/glfw/load_windows.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/internal/glfw/load_windows.go b/internal/glfw/load_windows.go index 20bc14a26..8c8a9a6db 100644 --- a/internal/glfw/load_windows.go +++ b/internal/glfw/load_windows.go @@ -38,11 +38,8 @@ func (d *dll) call(name string, args ...uintptr) uintptr { if _, ok := d.procs[name]; !ok { d.procs[name] = d.d.NewProc(name) } - r, _, err := d.procs[name].Call(args...) - if err != nil && err.(windows.Errno) != 0 { - // It looks like there is no way to handle these errors? - // panic(fmt.Sprintf("glfw: calling proc error: errno: %d (%s)", err, err.Error())) - } + // It looks like there is no way to handle Windows errors correctly. + r, _, _ := d.procs[name].Call(args...) return r }