mirror of https://github.com/PCSX2/pcsx2.git
wx3.0: force wide char as expected
Note: on linux it would be better to force everythings to use UTF8
This commit is contained in:
parent
d09fee90ad
commit
91afc2079c
|
@ -265,7 +265,7 @@ FastFormatUnicode& FastFormatUnicode::WriteV( const char* fmt, va_list argptr )
|
||||||
const uint inspos = m_Length;
|
const uint inspos = m_Length;
|
||||||
const uint convLen = converted.Length();
|
const uint convLen = converted.Length();
|
||||||
m_dest->MakeRoomFor((inspos + convLen + 64) * sizeof(wxChar));
|
m_dest->MakeRoomFor((inspos + convLen + 64) * sizeof(wxChar));
|
||||||
memcpy_fast( &((wxChar*)m_dest->GetPtr())[inspos], converted, (convLen+1)*sizeof(wxChar) );
|
memcpy_fast( &((wxChar*)m_dest->GetPtr())[inspos], converted.wc_str(), (convLen+1)*sizeof(wxChar) );
|
||||||
m_Length += convLen;
|
m_Length += convLen;
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
|
|
||||||
HashTools::hash_key_t operator()( const wxString& src ) const
|
HashTools::hash_key_t operator()( const wxString& src ) const
|
||||||
{
|
{
|
||||||
return HashTools::Hash( (const char *)src.Lower().data(), src.length() * sizeof( wxChar ) );
|
return HashTools::Hash( (const char *)src.Lower().wc_str(), src.length() * sizeof( wxChar ) );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -584,7 +584,7 @@ bool ConsoleLogFrame::Write( ConsoleColors color, const wxString& text )
|
||||||
|
|
||||||
int endpos = m_CurQueuePos + text.Length();
|
int endpos = m_CurQueuePos + text.Length();
|
||||||
m_QueueBuffer.MakeRoomFor( endpos + 1 ); // and the null!!
|
m_QueueBuffer.MakeRoomFor( endpos + 1 ); // and the null!!
|
||||||
memcpy_fast( &m_QueueBuffer[m_CurQueuePos], text.c_str(), sizeof(wxChar) * text.Length() );
|
memcpy_fast( &m_QueueBuffer[m_CurQueuePos], text.wc_str(), sizeof(wxChar) * text.Length() );
|
||||||
m_CurQueuePos = endpos;
|
m_CurQueuePos = endpos;
|
||||||
|
|
||||||
// this NULL may be overwritten if the next message sent doesn't perform a color change.
|
// this NULL may be overwritten if the next message sent doesn't perform a color change.
|
||||||
|
|
Loading…
Reference in New Issue