mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
internal/glfwwin: bug fix: unexpected error at wglSwapIntervalEXT
Updates #2478
This commit is contained in:
parent
ae715ba33b
commit
15c2fe01c0
@ -1856,7 +1856,8 @@ func wglShareLists(unnamedParam1 _HGLRC, unnamedParam2 _HGLRC) error {
|
||||
|
||||
func wglSwapIntervalEXT(interval int32) error {
|
||||
r, _, e := syscall.Syscall(procWGLSwapIntervalEXT, 1, uintptr(interval), 0, 0)
|
||||
if int32(r) == 0 {
|
||||
// wglSwapIntervalEXT can return ERROR_SUCCESS (#2478).
|
||||
if int32(r) == 0 && !errors.Is(e, windows.ERROR_SUCCESS) {
|
||||
return fmt.Errorf("glfwwin: wglSwapIntervalEXT failed: %w", e)
|
||||
}
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user