From 3d769df03626e93d3f5c52c8b2c6d7e2dc1e0e06 Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Fri, 1 Aug 2008 01:31:26 +0000 Subject: [PATCH] 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 --- Source/Core/DolphinWX/src/FileSearch.cpp | 3 +-- Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/src/FileSearch.cpp b/Source/Core/DolphinWX/src/FileSearch.cpp index 580d6c6bdd..d4441404d6 100644 --- a/Source/Core/DolphinWX/src/FileSearch.cpp +++ b/Source/Core/DolphinWX/src/FileSearch.cpp @@ -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); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 614e50cc23..260373d947 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -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;