projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e4f146
)
Add basic unicode support to the console (linux workaround)
author
Esteban I. Ruiz Moreno
<exio4.com@gmail.com>
Wed, 5 Jun 2013 01:14:31 +0000
(22:14 -0300)
committer
PilzAdam
<pilzadam@minetest.net>
Sat, 15 Jun 2013 15:09:11 +0000
(15:09 +0000)
src/guiChatConsole.cpp
patch
|
blob
|
history
diff --git
a/src/guiChatConsole.cpp
b/src/guiChatConsole.cpp
index c1219fb808c29fe535e01b3267b5e7c4070f8444..daec18efc91901ec57b0585682effcc8bd8debf8 100644
(file)
--- a/
src/guiChatConsole.cpp
+++ b/
src/guiChatConsole.cpp
@@
-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;
}
}