mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/glfw: bug fix: the cursor position was reset unexpectedly
There was a mistake when updating GLFW to v3.3.9 at 4647e9de53
.
When the cursor mode is set to be enabled, the cursor position was
unexpectedly reset. This change fixes the issue.
Closes #2997
This commit is contained in:
parent
5942192b66
commit
38d2892906
@ -2309,7 +2309,7 @@ func (w *Window) platformSetCursorMode(mode int) error {
|
||||
|
||||
if mode == CursorDisabled {
|
||||
_glfw.platformWindow.disabledCursorWindow = w
|
||||
} else {
|
||||
} else if _glfw.platformWindow.disabledCursorWindow == w {
|
||||
_glfw.platformWindow.disabledCursorWindow = nil
|
||||
if err := w.platformSetCursorPos(_glfw.platformWindow.restoreCursorPosX, _glfw.platformWindow.restoreCursorPosY); err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user