internal/glfw: Refactoring

This commit is contained in:
Hajime Hoshi 2021-08-09 03:40:29 +09:00
parent 4482301882
commit c6dd349338

View File

@ -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
}