From 1ab1ff980aecedccbe9a1e32a8edd558156bdfe4 Mon Sep 17 00:00:00 2001 From: GetAway Date: Sun, 2 Oct 2022 10:58:54 +0200 Subject: [PATCH] - neutrino.cpp: suppress inactivity popup in standby mode --- src/neutrino.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a118221a1..400e0f942 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4422,18 +4422,22 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) return messages_return::handled; } else if( msg == NeutrinoMessages::SLEEPTIMER) { - if(data) {//INACTIVITY SLEEPTIMER + if( data && mode == NeutrinoModes::mode_standby ) { //SKIP INACTIVITY SLEEPTIMER + printf("NeutrinoMessages::INACTIVITY SLEEPTIMER: skipping, already in standby mode\n"); + return messages_return::handled; + } + else if(data) {//INACTIVITY SLEEPTIMER int msgbox = ShowMsg(LOCALE_MESSAGEBOX_INFO, g_settings.shutdown_real ? LOCALE_SHUTDOWNTIMER_ANNOUNCE:LOCALE_SLEEPTIMERBOX_ANNOUNCE, CMsgBox::mbrCancel, CMsgBox::mbCancel, NULL, 450, 60); skipShutdownTimer = !(msgbox & CMsgBox::mbrTimeout); if(skipShutdownTimer) { - printf("NeutrinoMessages::INACTIVITY SLEEPTIMER: skiping\n"); + printf("NeutrinoMessages::INACTIVITY SLEEPTIMER: skipping\n"); skipShutdownTimer = false; return messages_return::handled; } }else{ //MAIN-MENU SLEEPTIMER if(skipSleepTimer) { - printf("NeutrinoMessages::SLEEPTIMER: skiping\n"); + printf("NeutrinoMessages::SLEEPTIMER: skipping\n"); skipSleepTimer = false; return messages_return::handled; }