mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add basic unicode support to the console (linux workaround)
This commit is contained in:
parent
3e4f1462bc
commit
93dfc3ec70
1 changed files with 7 additions and 1 deletions
|
@ -550,7 +550,13 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
|
|||
}
|
||||
else if(event.KeyInput.Char != 0 && !event.KeyInput.Control)
|
||||
{
|
||||
m_chat_backend->getPrompt().input(event.KeyInput.Char);
|
||||
#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);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue