This commit is contained in:
Birunthan Mohanathas 2012-05-13 12:30:20 +03:00
parent 69ec0aecc1
commit b80fe5dbd1
3 changed files with 5 additions and 4 deletions

View File

@ -1604,7 +1604,7 @@ void CDialogManage::CTabSettings::Initialize()
GetLocaleInfo(lcid, LOCALE_SNATIVELANGUAGENAME, fd.cFileName, MAX_PATH);
// Some native language names don't start with a uppercase char..
fd.cFileName[0] = towupper(fd.cFileName[0]);
LCMapString(LOCALE_USER_DEFAULT, LCMAP_UPPERCASE, &fd.cFileName[0], 1, &fd.cFileName[0], 1);
text += fd.cFileName;
int index = ComboBox_AddString(item, text.c_str());

View File

@ -48,11 +48,12 @@ void StringToProper(std::wstring& str)
{
if (!str.empty())
{
LCMapString(LOCALE_USER_DEFAULT, LCMAP_UPPERCASE, &str[0], 1, &str[0], 1);
WCHAR* srcAndDest = &str[0];
LCMapString(LOCALE_USER_DEFAULT, LCMAP_UPPERCASE, srcAndDest, 1, srcAndDest, 1);
for (size_t i = 1; i < str.length(); ++i)
{
WCHAR* srcAndDest = &str[i];
srcAndDest = &str[i];
LCMapString(LOCALE_USER_DEFAULT, (str[i - 1] == L' ') ? LCMAP_UPPERCASE : LCMAP_LOWERCASE, srcAndDest, 1, srcAndDest, 1);
}
}

View File

@ -1174,7 +1174,7 @@ void CRainmeter::CreateDataFile()
if (_waccess(pluginsFile, 0) == 0)
{
_wrename(pluginsFile, dataFile);
MoveFile(pluginsFile, dataFile);
}
else
{