From 85667fbe0fa186965829ce865a16ce8e69bc3314 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 9 Jan 2015 14:58:45 +0000 Subject: [PATCH] Fix the possible/suggested values for integer properties. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3889 --- src/misc/setup.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/misc/setup.cpp b/src/misc/setup.cpp index 8e10c2c4..7251d2f8 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -245,7 +245,9 @@ char const* Property::Get_help() { bool Prop_int::CheckValue(Value const& in, bool warn) { - if(suggested_values.empty() && Property::CheckValue(in,warn)) return true; +// if(!suggested_values.empty() && Property::CheckValue(in,warn)) return true; + if(!suggested_values.empty()) return Property::CheckValue(in,warn); + //No >= and <= in Value type and == is ambigious int mi = min; int ma = max; @@ -409,7 +411,7 @@ bool Prop_multival::SetValue(std::string const& input) { } else if(local.size()) { //last argument in = local; local = ""; - } + } //Test Value. If it fails set default Value valtest (in,p->Get_type()); if(!p->CheckValue(valtest,true)) {