MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Tick

Method Tick

Source/Engine/Platform/SDL/SDLPlatform.cpp:177–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177void SDLPlatform::Tick()
178{
179 SDLPlatformBase::Tick();
180 SDLInput::Update();
181
182 PreHandleEvents();
183
184 SDL_PumpEvents();
185 SDL_Event events[32];
186 int count = SDL_PeepEvents(events, SDL_arraysize(events), SDL_GETEVENT, SDL_EVENT_FIRST, SDL_EVENT_LAST);
187 for (int i = 0; i < count; ++i)
188 {
189 SDLWindow* window = SDLWindow::GetWindowFromEvent(events[i]);
190 if (window)
191 window->HandleEvent(events[i]);
192 else if (events[i].type >= SDL_EVENT_JOYSTICK_AXIS_MOTION && events[i].type <= SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED)
193 SDLInput::HandleEvent(nullptr, events[i]);
194 else
195 HandleEvent(events[i]);
196 }
197
198 PostHandleEvents();
199}
200
201bool SDLPlatform::HandleEvent(SDL_Event& event)
202{

Callers

nothing calls this directly

Calls 2

UpdateFunction · 0.50
HandleEventMethod · 0.45

Tested by

no test coverage detected