Interactive plugins and MENUTIMEOUT since 1.3.32

Message ID 200509302234.40561.rollercoaster@reel-multimedia.com
State New
Headers

Commit Message

rollercoaster@reel-multimedia.com Sept. 30, 2005, 8:34 p.m. UTC
  > > in 1.3.32 the timeout of the menu is now handled in the main loop
> > (vdr.c). this causes some plugins (in this case: channelscan) to be
> > closed after MENUTIMEOUT what is sometimes not wanted...
>
> Modify the plugin to return osContinue when there's no keypress.

thanks, it works, even if i still do not understand the intention of 
osContinue...

cheers,
thiemo


attached the patch for channelscan 0.1.0
  

Comments

Klaus Schmidinger Oct. 1, 2005, 12:41 p.m. UTC | #1
rollercoaster@reel-multimedia.com wrote:
>>>in 1.3.32 the timeout of the menu is now handled in the main loop
>>>(vdr.c). this causes some plugins (in this case: channelscan) to be
>>>closed after MENUTIMEOUT what is sometimes not wanted...
>>
>>Modify the plugin to return osContinue when there's no keypress.
> 
> 
> thanks, it works, even if i still do not understand the intention of 
> osContinue...
> 
> cheers,
> thiemo

The various osXxx values tell the parent menu (or the main loop)
what to do. osEnd, e.g., tells it to close the current menu, osUnknown
means that the current menu didn't know what to do with the key,
and osContinue just means "don't do anything special, just continue".

So osContinue is what a menu that doesn't want to be closed should
return instead of osUnknown.

Klaus
  

Patch

--- channelscan.c.org	2005-09-26 11:52:25.000000000 +0200
+++ channelscan.c	2005-09-30 22:15:15.000000000 +0200
@@ -179,14 +179,15 @@ 
 //--------- Destuctor ~cMainMenu -----------------------------------
 
 cMainMenu::~cMainMenu() {
+	ScanStat = aborted;
 	Cancel(3);
-	// fd frontend schließen 
+	// fd frontend schließen
 	if (fd_frontend > 0)
 		close(fd_frontend);
 	// ?
 	scanning_on_receiving_device = false;
 	scanning_by_channelscan = false;
-	delete osd; 
+	delete osd;
 	if (PFilter)
 	cDevice::GetDevice(cardnr)->Detach(PFilter);
 	if (SFilter)
@@ -394,14 +395,13 @@ 
 				if (srcIndex < 0)
 				srcIndex = 0;
 			}
-		break;
-		default: return state;
-	 	}
-	 state = osContinue;
-	 Show();
-
+			break;
+		default: return osContinue;
+		}
+		state = osContinue;
+		Show();
 	}
-	
+
 	return state;
 }