| 5085 | } |
| 5086 | |
| 5087 | void 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__) |
| 5112 | int main(int argc, char **argv) { |
| 5113 | struct demo demo; |
nothing calls this directly
no test coverage detected