From 7b7d9a384a4eb5ba78f5e70045ad64aa074dca0a Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Fri, 5 Dec 2025 11:05:52 -0500 Subject: [PATCH] scrobbler / log viewer allow cancel button long press to exit plugin some devices will shutdown before the button repeat even occurs so unfortunately it still might not work on some devices (sansa clip series) Change-Id: I1c5eda6c5a97887f69e1fbd0ada39cce01db352b --- apps/plugins/lastfm_scrobbler_viewer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/plugins/lastfm_scrobbler_viewer.c b/apps/plugins/lastfm_scrobbler_viewer.c index af5f545a9a..c7bf2bab8b 100644 --- a/apps/plugins/lastfm_scrobbler_viewer.c +++ b/apps/plugins/lastfm_scrobbler_viewer.c @@ -850,8 +850,8 @@ static void cleanup(void *parameter) static void menu_action_printcell(int *action, int selected_item, bool* exit, struct gui_synclist *lists) { - (void) exit; struct printcell_data_t *pc_data = (struct printcell_data_t*) lists->data; + static int last_action = ACTION_NONE; if (*action == ACTION_STD_OK) { if (selected_item < lists->nb_items) @@ -860,6 +860,11 @@ static void menu_action_printcell(int *action, int selected_item, bool* exit, st *action = ACTION_NONE; } } + else if (*action == ACTION_STD_CANCEL && last_action == ACTION_STD_CANCEL) + { + /* allow user to hold cancel to quit */ + *exit = true; + } else if (*action == ACTION_STD_CANCEL) { pc_data->view_lastcol = printcell_increment_column(-1, true); @@ -874,6 +879,7 @@ static void menu_action_printcell(int *action, int selected_item, bool* exit, st if (ctxret == QUIT_CONTEXT_MENU) *exit = true; } + last_action = *action; } int menu_action_cb(int *action, int selected_item, bool* exit, struct gui_synclist *lists)