1
0
Fork 0

Fix the possible/suggested values for integer properties.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3889
This commit is contained in:
Peter Veenstra 2015-01-09 14:58:45 +00:00
parent 017fda9ba0
commit 85667fbe0f

View file

@ -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)) {