From e8aac54d8081bdba89f9ba2ccc67aa18a5463856 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Mon, 18 Feb 2008 20:25:21 +0000 Subject: [PATCH] Add case insensitive support for string type options. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3105 --- src/misc/setup.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/misc/setup.cpp b/src/misc/setup.cpp index 3752ab37..11cb5e79 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: setup.cpp,v 1.44 2008-02-10 11:14:03 qbix79 Exp $ */ +/* $Id: setup.cpp,v 1.45 2008-02-18 20:25:21 qbix79 Exp $ */ #include "dosbox.h" #include "cross.h" @@ -255,7 +255,12 @@ void Prop_int::SetValue(std::string const& input){; } void Prop_string::SetValue(std::string const& input){ - Value val(input,Value::V_STRING); + //Special version for lowcase stuff + std::string temp(input); + //suggested values always case insensitive. + //If there are none then it can be paths and such which are case sensitive + if(!suggested_values.empty()) lowcase(temp); + Value val(temp,Value::V_STRING); SetVal(val,false,true); }