mirror of https://github.com/PCSX2/pcsx2.git
Lilypad: fix ini file support on non-english systems (unicode compliance issue).
Details: The "%S" directive in sprintf() only does a shallow wide char conversion from ASCII, it does not actually convert UTF8 to UTF16. Replaced it with a call to MultiByteToWideChar. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3878 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
dbf1a1c7aa
commit
53ebbc0242
|
@ -277,8 +277,11 @@ static wchar_t iniFile[MAX_PATH*2] = L"inis\\LilyPad.ini";
|
||||||
void CALLBACK PADsetSettingsDir( const char *dir )
|
void CALLBACK PADsetSettingsDir( const char *dir )
|
||||||
{
|
{
|
||||||
// emulator assures a trailing slash/backslash (yay!)
|
// emulator assures a trailing slash/backslash (yay!)
|
||||||
swprintf_s( iniFile, L"%S", (dir==NULL) ? "inis\\" : dir );
|
//swprintf_s( iniFile, L"%S", (dir==NULL) ? "inis\\" : dir );
|
||||||
wcscat(iniFile, L"LilyPad.ini");
|
|
||||||
|
//uint targlen = MultiByteToWideChar(CP_UTF8, 0, dir, -1, NULL, 0);
|
||||||
|
MultiByteToWideChar(CP_UTF8, 0, dir, -1, iniFile, MAX_PATH*2);
|
||||||
|
wcscat_s(iniFile, L"LilyPad.ini");
|
||||||
|
|
||||||
createIniDir = false;
|
createIniDir = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue