mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 18:52:44 +01:00
internal/uidriver/glfw: remove an unnecessary error handling
This commit is contained in:
parent
e261951946
commit
cbf13630a9
@ -53,11 +53,10 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func getSystemMetrics(nIndex int) (int32, error) {
|
func getSystemMetrics(nIndex int) (int32, error) {
|
||||||
r, _, e := procGetSystemMetrics.Call(uintptr(nIndex))
|
r, _, _ := procGetSystemMetrics.Call(uintptr(nIndex))
|
||||||
if r == 0 {
|
if r == 0 {
|
||||||
if e != nil && e != windows.ERROR_SUCCESS {
|
// GetLastError doesn't provide an extended information.
|
||||||
return 0, fmt.Errorf("glfw: GetSystemMetrics failed: error code: %w", e)
|
// See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetrics
|
||||||
}
|
|
||||||
return 0, fmt.Errorf("glfw: GetSystemMetrics returned 0")
|
return 0, fmt.Errorf("glfw: GetSystemMetrics returned 0")
|
||||||
}
|
}
|
||||||
return int32(r), nil
|
return int32(r), nil
|
||||||
|
Loading…
Reference in New Issue
Block a user