From patchwork Sun Jul 31 20:02:08 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TWFya28gTcOka2Vsw6Q=?= X-Patchwork-Id: 11960 Received: from smtp-3.hut.fi ([130.233.228.93]) by www.linuxtv.org with esmtp (Exim 4.34) id 1DzK1x-0007Yq-6s for vdr@linuxtv.org; Sun, 31 Jul 2005 22:03:29 +0200 Received: from localhost (katosiko.hut.fi [130.233.228.115]) by smtp-3.hut.fi (8.12.10/8.12.10) with ESMTP id j6VK2wwu018802 for ; Sun, 31 Jul 2005 23:02:58 +0300 Received: from smtp-3.hut.fi ([130.233.228.93]) by localhost (katosiko.hut.fi [130.233.228.115]) (amavisd-new, port 10024) with LMTP id 06155-50-8 for ; Sun, 31 Jul 2005 23:02:57 +0300 (EEST) Received: from kosh.hut.fi (kosh.hut.fi [130.233.228.10]) by smtp-3.hut.fi (8.12.10/8.12.10) with ESMTP id j6VK28fY018710 for ; Sun, 31 Jul 2005 23:02:08 +0300 Received: (from msmakela@localhost) by kosh.hut.fi (8.12.10/8.12.9/Submit) id j6VK28Fw297008 for vdr@linuxtv.org; Sun, 31 Jul 2005 23:02:08 +0300 (EEST) Date: Sun, 31 Jul 2005 23:02:08 +0300 From: Marko =?iso-8859-1?B?TeRrZWzk?= To: vdr@linuxtv.org Message-ID: <20050731200208.GC102185@kosh.hut.fi> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.4i Organization: Helsinki University of Technology X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on katosiko.hut.fi X-TKK-Virus-Scanned: by amavisd-new-2.1.2-hutcc at katosiko.hut.fi Subject: [vdr] [PATCH] obey Power key while replaying a recording X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2005 20:03:29 -0000 Status: O X-Status: X-Keywords: X-UID: 3870 Hi all, Klaus responded to my private message about the Power key being ignored while playing back a recording. He suggested to add a cControl::Shutdown() call to the kPower handler. I did that, and the attached patch (against vdr-1.3.27) works for me. I'm not sure if it is necessary to move the assignments before the cControl::Shutdown() call, but I thought it would be safer that way. Marko --- vdr.c 2005-06-18 14:19:07.000000000 +0300 +++ vdr.c.mod 2005-07-31 22:27:38.000000000 +0300 @@ -738,12 +738,15 @@ Skins.Message(mtError, tr("Can't shutdown - option '-s' not given!")); break; } + LastActivity = 1; // not 0, see below! + UserShutdown = true; if (cRecordControls::Active()) { if (Interface->Confirm(tr("Recording - shut down anyway?"))) ForceShutdown = true; + cControl::Shutdown(); } - LastActivity = 1; // not 0, see below! - UserShutdown = true; + else + cControl::Shutdown(); break; default: break; }