MCPcopy Create free account
hub / github.com/crownengine/crown / run

Method run

src/device/main_android.cpp:508–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506 }
507
508 void run(struct android_app *app, DeviceOptions &opts)
509 {
510 _app = app;
511 _opts = &opts;
512
513 app->userData = this;
514 app->onAppCmd = crown::AndroidDevice::on_app_cmd;
515 app->onInputEvent = crown::AndroidDevice::on_input_event;
516 ANativeActivity_setWindowFlags(app->activity
517 , AWINDOW_FLAG_FULLSCREEN | AWINDOW_FLAG_KEEP_SCREEN_ON
518 , 0
519 );
520
521 while (app->destroyRequested == 0) {
522 s32 num;
523 android_poll_source *source;
524 ALooper_pollOnce(-1, NULL, &num, (void **)&source);
525
526 if (source != NULL)
527 source->process(app, source);
528 }
529
530 _main_thread.stop();
531 shutdown_pointer_capture_api();
532 }
533
534 void process_command(struct android_app *app, s32 cmd)
535 {

Callers 1

android_mainFunction · 0.45

Calls 2

processMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected