MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / initialize

Method initialize

framework/platform/android/android_platform.cpp:345–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345ExitCode AndroidPlatform::initialize(const std::vector<Plugin *> &plugins)
346{
347 for (auto plugin : plugins)
348 {
349 plugin->clear_platform();
350 }
351 android_app_set_key_event_filter(app, key_event_filter);
352 android_app_set_motion_event_filter(app, motion_event_filter);
353
354 app->onAppCmd = on_app_cmd;
355 app->activity->callbacks->onContentRectChanged = on_content_rect_changed;
356 app->userData = this;
357
358 auto code = Platform::initialize(plugins);
359 if (code != ExitCode::Success)
360 {
361 return code;
362 }
363
364 // Wait until the android window is loaded before allowing the app to continue
365 LOGI("Waiting on window surface to be ready");
366 do
367 {
368 if (!process_android_events(app))
369 {
370 // Android requested for the app to close
371 LOGI("Android app has been destroyed by the OS");
372 return ExitCode::Close;
373 }
374 } while (!surface_ready);
375
376 return ExitCode::Success;
377}
378
379void AndroidPlatform::create_window(const Window::Properties &properties)
380{

Callers

nothing calls this directly

Calls 2

process_android_eventsFunction · 0.85
clear_platformMethod · 0.80

Tested by

no test coverage detected