MCPcopy Create free account
hub / github.com/Norbyte/bg3se / OnInputEvent

Method OnInputEvent

BG3Extender/Extender/Client/ExtensionStateClient.cpp:103–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void ExtensionState::OnInputEvent(SDL_Event* event, int& result)
104{
105 // Only dispatch cancelable events from the SDL thread
106 // (i.e. where we need immediate feedback from Lua code);
107 // others are deferred to the client update loop
108 if (Lua && Lua->IsEventCancelable(event)) {
109 ContextGuard ctx(ContextType::Client);
110 LuaClientPin lua(*this);
111 if (lua) {
112 lua->OnInputEvent(event, &result);
113 }
114 } else {
115 deferredInputEvents_.push(*event);
116 }
117}
118
119END_NS()

Callers 2

FireInputEventsMethod · 0.45
SDLPollEventInternalMethod · 0.45

Calls 1

IsEventCancelableMethod · 0.80

Tested by

no test coverage detected