MCPcopy Create free account
hub / github.com/PolygonTek/BlueshiftEngine / ProcessEventLoop

Function ProcessEventLoop

Source/Player/AndroidMain.cpp:599–622  ·  view source on GitHub ↗

Process all pending events.

Source from the content-addressed store, hash-verified

597
598// Process all pending events.
599static bool ProcessEventLoop(android_app *appState) {
600 int id;
601 int events;
602 android_poll_source *source;
603
604 // If not animating, we will block forever waiting for events.
605 // If animating, we loop until all events are read, then continue
606 // to draw the next frame of animation.
607 while ((id = ALooper_pollAll(!suspended ? 0 : -1, nullptr, &events, (void **)&source)) >= 0) {
608 // Process this event.
609 if (source) {
610 source->process(appState, source);
611 }
612
613 ProcessSensors(id);
614
615 // Check if we are exiting.
616 if (appState->destroyRequested != 0) {
617 return false;
618 }
619 }
620
621 return true;
622}
623
624extern "C" {
625

Callers 1

android_mainFunction · 0.70

Calls 2

ProcessSensorsFunction · 0.70
processMethod · 0.45

Tested by

no test coverage detected