Add basic unicode support to the console (linux workaround)

This commit is contained in:
Esteban I. Ruiz Moreno 2013-06-04 22:14:31 -03:00 committed by PilzAdam
parent 3e4f1462bc
commit 93dfc3ec70

@ -550,7 +550,13 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
} }
else if(event.KeyInput.Char != 0 && !event.KeyInput.Control) else if(event.KeyInput.Char != 0 && !event.KeyInput.Control)
{ {
#if (defined(linux) || defined(__linux))
wchar_t wc = L'_';
mbtowc( &wc, (char *) &event.KeyInput.Char, sizeof(event.KeyInput.Char) );
m_chat_backend->getPrompt().input(wc);
#else
m_chat_backend->getPrompt().input(event.KeyInput.Char); m_chat_backend->getPrompt().input(event.KeyInput.Char);
#endif
return true; return true;
} }
} }