Wrapped core.on_event
calls in core.try
This commit is contained in:
parent
22171fa802
commit
a651d48e84
|
@ -333,12 +333,13 @@ function core.step()
|
||||||
elseif type == "textinput" and did_keymap then
|
elseif type == "textinput" and did_keymap then
|
||||||
did_keymap = false
|
did_keymap = false
|
||||||
else
|
else
|
||||||
did_keymap = core.on_event(type, a, b, c, d) or did_keymap
|
local _, res = core.try(core.on_event, type, a, b, c, d)
|
||||||
|
did_keymap = res or did_keymap
|
||||||
end
|
end
|
||||||
core.redraw = true
|
core.redraw = true
|
||||||
end
|
end
|
||||||
if mouse_moved then
|
if mouse_moved then
|
||||||
core.on_event("mousemoved", mouse.x, mouse.y, mouse.dx, mouse.dy)
|
core.try(core.on_event, "mousemoved", mouse.x, mouse.y, mouse.dx, mouse.dy)
|
||||||
end
|
end
|
||||||
|
|
||||||
local width, height = renderer.get_size()
|
local width, height = renderer.get_size()
|
||||||
|
|
Loading…
Reference in a new issue