Commit 3cd875e9 authored by Federico Vaga's avatar Federico Vaga

add application method quit()

Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
parent 2f05af05
......@@ -50,6 +50,7 @@ typedef struct {
* @params Optional parameters, dependendent on application.
*/
void (*main)(void* params);
void (*quit)(application *app);
} application;
/**
......
......@@ -150,6 +150,8 @@ static void menu_ui_init() {
static void run(menu_entry *entry) {
if(entry->type == APP) {
entry->data.app->main(NULL);
if (entry->data.app->quit)
entry->data.app->quit(entry->data.app);
} else if(entry->type == SUBMENU) {
selected_item = 0;
offset = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment