Makes file search case insensitive with a little help from strcasecmp

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@118 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1 2008-08-01 01:31:26 +00:00
parent 3b4a9e06c2
commit 3d769df036
2 changed files with 1 additions and 3 deletions

View File

@ -97,8 +97,7 @@ void CFileSearch::FindFiles(const std::string& _searchString, const std::string&
strcpy(temp, dp->d_name);
std::string s(temp);
// TODO - case insensitive comparison
if ((s.size() > ext.size()) && (s.substr(s.size() - ext.size()) == ext))
if ( (s.size() > ext.size()) && (!strcasecmp(s.substr(s.size() - ext.size()).c_str(), ext.c_str())) )
{
std::string full_name = _strPath + "/" + s;
m_FileNames.push_back(full_name);

View File

@ -77,7 +77,6 @@ void DllConfig(HWND _hParent)
#else
ConfigDialog frame(NULL);
g_Config.Load();
printf("Window res: %s, size of: %d strlen %d\n", g_Config.iWindowedRes, sizeof(g_Config.iWindowedRes), strlen(g_Config.iWindowedRes));
XVisualInfo *vi;
Colormap cmap;
int dpyWidth, dpyHeight;