From patchwork Fri May 12 13:36:36 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 12305 Received: from raven.cadsoft.de ([217.7.101.211]) by www.linuxtv.org with esmtp (Exim 4.50) id 1FeXou-0004gZ-Ju for vdr@linuxtv.org; Fri, 12 May 2006 15:36:40 +0200 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.13.3/8.13.3) with ESMTP id k4CDaclL008881 for ; Fri, 12 May 2006 15:36:39 +0200 Message-ID: <44648F64.9020503@cadsoft.de> Date: Fri, 12 May 2006 15:36:36 +0200 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Thunderbird 1.5.0.2 (X11/20060420) MIME-Version: 1.0 To: vdr@linuxtv.org Subject: Re: [vdr] learning keys for LIRC fails on --no-kbd References: <4461AC46.7070707@web.de> In-Reply-To: <4461AC46.7070707@web.de> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Fri, 12 May 2006 15:36:39 +0200 (CEST) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2006 13:36:40 -0000 Status: O X-Status: X-Keywords: X-UID: 9418 André Weidemann wrote: > Hi all, > I am using vdr 1.4.0. I compiled it with REMOTE=LIRC. > I only need LIRC to control VDR so I started it with the following command: > > ./vdr -u vdr --no-kbd > > After that VDR starts, but does not ask me to press a key on the remote > for LIRC. > Is there a way to only "teach" VDR the keys for LIRC or do I always have > to start with the keyboard? This might be the same problem as reported by Helmut Auer in a PM. Please try the attached fix. Klaus --- remote.c 2006/04/17 08:58:28 1.50 +++ remote.c 2006/05/12 12:40:15 1.51 @@ -182,11 +182,11 @@ repeatTimeout.Set(REPEATTIMEOUT); return k; } - else if (!WaitMs || !keyPressed.TimedWait(mutex, WaitMs) && repeatTimeout.TimedOut()) { - if (learning && UnknownCode) { - *UnknownCode = unknownCode; - unknownCode = NULL; - } + else if (!WaitMs || !keyPressed.TimedWait(mutex, WaitMs) && repeatTimeout.TimedOut()) + return kNone; + else if (learning && UnknownCode && unknownCode) { + *UnknownCode = unknownCode; + unknownCode = NULL; return kNone; } }