Fix Linux build broken by use of stricmp and vsnwprintf.

strcasecmp is provided by Source/Core/Common/Src/CommonFuncs.h
and vswprintf is overloaded in C++ to take the same parameters as
vsnwprintf, according to MSDN.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5470 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
pierre 2010-05-23 20:13:45 +00:00
parent 655e3b3381
commit 19e3e6effe
1 changed files with 3 additions and 3 deletions

View File

@ -157,7 +157,7 @@ std::wstring StringFromFormat(const wchar_t* format, ...)
buf = new wchar_t[newSize + 1];
va_start(args, format);
writtenCount = _vsnwprintf(buf, newSize, format, args);
writtenCount = vswprintf(buf, newSize, format, args);
va_end(args);
if (writtenCount >= (int)newSize) {
writtenCount = -1;
@ -302,12 +302,12 @@ bool TryParseInt(const char* str, int* outVal)
bool TryParseBool(const char* str, bool* output)
{
if ((str[0] == '1') || !stricmp(str, "true"))
if ((str[0] == '1') || !strcasecmp(str, "true"))
{
*output = true;
return true;
}
else if (str[0] == '0' || !stricmp(str, "false"))
else if (str[0] == '0' || !strcasecmp(str, "false"))
{
*output = false;
return true;