From 0f4799d70b7840bfba5fd7015d9ce8f14ebb8815 Mon Sep 17 00:00:00 2001 From: aanper Date: Sat, 17 Oct 2020 13:10:53 +0300 Subject: [PATCH] run/kill app, issue with multiple load --- applications/app-loader/app-loader.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/applications/app-loader/app-loader.c b/applications/app-loader/app-loader.c index 54d5465b0..1c7219cb0 100644 --- a/applications/app-loader/app-loader.c +++ b/applications/app-loader/app-loader.c @@ -29,6 +29,7 @@ void input_callback(InputEvent* input_event, void* _ctx) { AppLoaderState* ctx = (AppLoaderState*)_ctx; if(input_event->state && input_event->input == InputBack){ + furiac_kill(ctx->handler); widget_enabled_set(ctx->widget, false); } } @@ -36,14 +37,13 @@ void input_callback(InputEvent* input_event, void* _ctx) { void handle_menu(void* _ctx) { AppLoaderContext* ctx = (AppLoaderContext*)_ctx; - ctx->state->current_app = ctx->app; - widget_enabled_set(ctx->state->widget, true); - // TODO create a dependency tree and run tasks in the desired order + // TODO how to call this? // furiac_wait_libs(&FLIPPER_STARTUP[i].libs); - // handlers[i] = furiac_start(FLIPPER_STARTUP[i].app, FLIPPER_STARTUP[i].name, NULL); - // FuriApp* handlers[flipper_app_count]; + + ctx->state->current_app = ctx->app; + ctx->state->handler = furiac_start(ctx->app->app, ctx->app->name, NULL); } void application_blink(void* p);