fix key callback for glfw.KeyUnknown
This commit is contained in:
parent
94fe4019fd
commit
fa774a4259
|
@ -329,6 +329,9 @@ func (w *Window) initInput() {
|
||||||
})
|
})
|
||||||
|
|
||||||
w.window.SetKeyCallback(func(_ *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey) {
|
w.window.SetKeyCallback(func(_ *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey) {
|
||||||
|
if key == glfw.KeyUnknown {
|
||||||
|
return
|
||||||
|
}
|
||||||
switch action {
|
switch action {
|
||||||
case glfw.Press:
|
case glfw.Press:
|
||||||
w.currInp.buttons[Button(key)] = true
|
w.currInp.buttons[Button(key)] = true
|
||||||
|
|
Loading…
Reference in New Issue