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:
parent
017fda9ba0
commit
85667fbe0f
1 changed files with 4 additions and 2 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue