[prev in list] [next in list] [prev in thread] [next in thread]
List: xine-cvslog
Subject: [xine-cvs] =?utf-8?q?HG=3A_xine-lib-1=2E2=3A_configfile=3A_fix_ra?= =?utf-8?q?nge_check_for_xine-ui_
From: Petri_Hintukainen via Xine-cvslog <xine-cvslog () lists ! sourceforge ! net
Date: 2017-09-29 12:32:49
Message-ID: 7937f905cb3eefbc48bf.1506687974 () hg ! debian ! org
[Download RAW message or body]
# HG changeset patch
# User Petri Hintukainen <phintuka@users.sourceforge.net>
# Date 1506687974 -10800
# Node ID 7937f905cb3eefbc48bf6e1980af282aab2b7d28
# Branch default
# Parent b56ce1714d34ad2ee3a85bae0a4d185e9a3fd109
configfile: fix range check for xine-ui brightness etc.
xine-ui uses out-of-range value as default value ...
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.c
@@ -683,12 +683,16 @@
if (entry->num_value > max) {
printf("configfile: WARNING: value %d for %s is larger than max (%d)\n",
entry->num_value, key, max);
- entry->num_value = max;
+ // allow default to be out of range.
+ // (xine-ui uses this for brightness, ...)
+ if (entry->num_value != def_value)
+ entry->num_value = max;
}
if (entry->num_value < min) {
printf("configfile: WARNING: value %d for %s is smaller than min (%d)\n",
entry->num_value, key, max);
- entry->num_value = min;
+ if (entry->num_value != def_value)
+ entry->num_value = min;
}
/* fill out rest of struct */
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic