MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / optApp

Function optApp

Tactility/Source/app/screenshot/Screenshot.cpp:54–61  ·  view source on GitHub ↗

Returns the app data if the app is active. Note that this could clash if the same app is started twice and a background thread is slow. */

Source from the content-addressed store, hash-verified

52
53/** Returns the app data if the app is active. Note that this could clash if the same app is started twice and a background thread is slow. */
54std::shared_ptr<ScreenshotApp> optApp() {
55 auto appContext = getCurrentAppContext();
56 if (appContext != nullptr && appContext->getManifest().appId == manifest.appId) {
57 return std::static_pointer_cast<ScreenshotApp>(appContext->getApp());
58 } else {
59 return nullptr;
60 }
61}
62
63static void onStartPressedCallback(lv_event_t* event) {
64 auto app = optApp();

Callers 2

onStartPressedCallbackFunction · 0.70
onModeSetCallbackFunction · 0.70

Calls 2

getCurrentAppContextFunction · 0.85
getAppMethod · 0.80

Tested by

no test coverage detected