MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / android_main

Function android_main

cube/cube.c:5087–5110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5085}
5086
5087void android_main(struct android_app *app) {
5088 demo.initialized = false;
5089
5090 app->onAppCmd = processCommand;
5091 app->onInputEvent = processInput;
5092
5093 while (1) {
5094 int events;
5095 struct android_poll_source *source;
5096 while (ALooper_pollOnce(active ? 0 : -1, NULL, &events, (void **)&source) >= 0) {
5097 if (source) {
5098 source->process(app, source);
5099 }
5100
5101 if (app->destroyRequested != 0) {
5102 demo_cleanup(&demo);
5103 return;
5104 }
5105 }
5106 if (demo.initialized && demo.swapchain_ready && active) {
5107 demo_run(&demo);
5108 }
5109 }
5110}
5111#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__QNX__) || defined(__GNU__)
5112int main(int argc, char **argv) {
5113 struct demo demo;

Callers

nothing calls this directly

Calls 2

demo_cleanupFunction · 0.85
demo_runFunction · 0.85

Tested by

no test coverage detected