1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

cMenuEditIntItem now checks the given value and forces it to be between the given min and max limits

This commit is contained in:
Klaus Schmidinger 2006-02-28 12:54:38 +01:00
parent 085b1c4dda
commit 9887c0765b
2 changed files with 7 additions and 1 deletions

View File

@ -4419,3 +4419,5 @@ Video Disk Recorder Revision History
- Fixed updating the "Info" button in the "Timers" menu.
- Reduced the number of events to actually check when setting events to timers.
- cMenuEditIntItem now checks the given value and forces it to be between the
given min and max limits.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menuitems.c 1.32 2006/02/12 10:31:08 kls Exp $
* $Id: menuitems.c 1.33 2006/02/28 12:53:37 kls Exp $
*/
#include "menuitems.h"
@ -51,6 +51,10 @@ cMenuEditIntItem::cMenuEditIntItem(const char *Name, int *Value, int Min, int Ma
value = Value;
min = Min;
max = Max;
if (*value < min)
*value = min;
else if (*value > max)
*value = max;
Set();
}