Input: Leave EV_SDL mostly alone in inhibitInput (#10430)

It's mostly not used for actual input, but sideband stuff that we don't want to miss.

Fix #10427
reviewable/pr10434/r1
NiLuJe 1 year ago committed by GitHub
parent 38727d882b
commit fdea39c2d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1403,7 +1403,16 @@ function Input:inhibitInput(toggle)
end
if not self._sdl_ev_handler then
self._sdl_ev_handler = self.handleSdlEv
self.handleSdlEv = self.voidEv
-- This is mainly used for non-input events, so we mostly want to leave it alone (#10427).
-- The only exception being mwheel handling, which we *do* want to inhibit.
self.handleSdlEv = function(this, ev)
local SDL_MOUSEWHEEL = 1027
if ev.code == SDL_MOUSEWHEEL then
return
else
return this:_sdl_ev_handler(ev)
end
end
end
if not self._generic_ev_handler then
self._generic_ev_handler = self.handleGenericEv

Loading…
Cancel
Save