From 3b9193982bf643fc3ed94659fdb32dcad32615ce Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 1 Nov 2012 20:30:18 +0100 Subject: [PATCH] - shutdown_count.cpp: add NEUTRINO_ENTER_INACTIVITY_SCRIPT script will be executed if g_settings.shutdown_min expires --- src/driver/shutdown_count.cpp | 6 ++++++ src/global.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/driver/shutdown_count.cpp b/src/driver/shutdown_count.cpp index 9bf77c2f1..a7b092022 100644 --- a/src/driver/shutdown_count.cpp +++ b/src/driver/shutdown_count.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -106,6 +107,11 @@ void SHTDCNT::shutdown_counter() sleep_cnt--; } else if(sleeptimer_active && !CNeutrinoApp::getInstance ()->recordingstatus) { sleeptimer_active = false; + + puts("[SHTDCNT] executing " NEUTRINO_ENTER_INACTIVITY_SCRIPT "."); + if (my_system(NEUTRINO_ENTER_INACTIVITY_SCRIPT) != 0) + perror(NEUTRINO_ENTER_INACTIVITY_SCRIPT " failed"); + printf("[SHTDCNT] sleep-timer send NeutrinoMessages::SLEEPTIMER\n"); g_RCInput->postMsg(NeutrinoMessages::SLEEPTIMER, 1); } diff --git a/src/global.h b/src/global.h index 6dc24d549..cd6a8499c 100644 --- a/src/global.h +++ b/src/global.h @@ -66,6 +66,7 @@ #define NEUTRINO_RECORDING_ENDED_SCRIPT CONFIGDIR "/recording.end" #define NEUTRINO_ENTER_STANDBY_SCRIPT CONFIGDIR "/standby.on" #define NEUTRINO_LEAVE_STANDBY_SCRIPT CONFIGDIR "/standby.off" +#define NEUTRINO_ENTER_INACTIVITY_SCRIPT CONFIGDIR "/inactivity.on" #define NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT CONFIGDIR "/deepstandby.on" #define NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT CONFIGDIR "/deepstandby.off" #define MOVIEPLAYER_START_SCRIPT CONFIGDIR "/movieplayer.start"