MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _process

Method _process

Engine/source/windowManager/sdl/sdlWindowMgr.cpp:341–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341void PlatformWindowManagerSDL::_process()
342{
343 SDL_Event evt;
344 while( SDL_PollEvent(&evt) )
345 {
346 if (evt.type >= SDL_JOYAXISMOTION && evt.type <= SDL_CONTROLLERDEVICEREMAPPED)
347 {
348 SDLInputManager* mgr = static_cast<SDLInputManager*>(Input::getManager());
349 if (mgr)
350 mgr->processEvent(evt);
351 continue;
352 }
353 switch(evt.type)
354 {
355 case SDL_QUIT:
356 {
357 PlatformWindowSDL *window = static_cast<PlatformWindowSDL*>( getFirstWindow() );
358 if(window)
359 window->appEvent.trigger( window->getWindowId(), WindowClose );
360 break;
361 }
362
363 case SDL_KEYDOWN:
364 case SDL_KEYUP:
365 {
366 PlatformWindowSDL *window = mWindowMap[evt.key.windowID];
367 if(window)
368 window->_processSDLEvent(evt);
369 break;
370 }
371
372 case SDL_MOUSEWHEEL:
373 {
374 PlatformWindowSDL *window = mWindowMap[evt.wheel.windowID];
375 if (window)
376 window->_processSDLEvent(evt);
377 break;
378 }
379
380 case SDL_MOUSEMOTION:
381 {
382 PlatformWindowSDL *window = mWindowMap[evt.motion.windowID];
383 if(window)
384 window->_processSDLEvent(evt);
385 break;
386 }
387
388 case SDL_MOUSEBUTTONDOWN:
389 case SDL_MOUSEBUTTONUP:
390 {
391 PlatformWindowSDL *window = mWindowMap[evt.button.windowID];
392 if(window)
393 window->_processSDLEvent(evt);
394 break;
395 }
396
397 case SDL_TEXTINPUT:
398 {

Callers

nothing calls this directly

Calls 12

SDL_PollEventFunction · 0.85
isFunctionFunction · 0.85
executefFunction · 0.85
SDL_freeFunction · 0.85
SDL_StartTextInputFunction · 0.85
SDL_StopTextInputFunction · 0.85
_processSDLEventMethod · 0.80
warnfFunction · 0.50
processEventMethod · 0.45
triggerMethod · 0.45
getWindowIdMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected