mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
GCPad/WiimoteNew: Hopefully fixed a problem where devices with extended ascii characters in their names didn't work.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5718 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -125,13 +125,13 @@ LCleanup:
|
||||
|
||||
std::string TStringToString( const std::basic_string<TCHAR>& in )
|
||||
{
|
||||
const int size = WideCharToMultiByte( CP_UTF8, 0, in.data(), int(in.length()), NULL, 0, NULL, NULL );
|
||||
const int size = WideCharToMultiByte(CP_ACP, 0, in.data(), int(in.length()), NULL, 0, NULL, NULL);
|
||||
|
||||
if ( 0 == size )
|
||||
return "";
|
||||
|
||||
char* const data = new char[size];
|
||||
WideCharToMultiByte( CP_UTF8, 0, in.data(), int(in.length()), data, size, NULL, NULL );
|
||||
WideCharToMultiByte(CP_ACP, 0, in.data(), int(in.length()), data, size, NULL, NULL);
|
||||
const std::string out( data, size );
|
||||
delete[] data;
|
||||
return out;
|
||||
|
Reference in New Issue
Block a user