#!/bin/sh /usr/share/dpatch/dpatch-run ## powermate-1.3.18 patch - by Thomas Günther ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Changes for VDR >= 1.3.18. @DPATCH@ --- powermate-0.0.2/powermate.c +++ powermate-0.0.2/powermate.c @@ -32,7 +32,9 @@ : context(kContextNormal), menu(false), pushed(false), +#if VDRVERSNUM < 10318 lastPush(0), +#endif offset(0), click(false), turn(false) @@ -125,8 +127,12 @@ } if (click && !pushed) { +#if VDRVERSNUM < 10318 int current = time_ms(); if (current - lastPush > PowerMateSetup.doubleClickTime) +#else + if (doubleClickTimeOut.TimedOut()) +#endif { //printf("CLICK\n"); ProcessEvent(kEventClick); @@ -207,7 +213,11 @@ pushed = true; turn = false; offset = 0; +#if VDRVERSNUM < 10318 lastPush = time_ms(); +#else + doubleClickTimeOut.Set(PowerMateSetup.doubleClickTime); +#endif } else { --- powermate-0.0.2/powermate.h +++ powermate-0.0.2/powermate.h @@ -25,7 +25,11 @@ bool menu; bool pushed; +#if VDRVERSNUM < 10318 int lastPush; +#else + cTimeMs doubleClickTimeOut; +#endif int offset; bool click; bool turn;