projects
/
oweals
/
minetest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Show infotext with description for item entities
[oweals/minetest.git]
/
src
/
keycode.cpp
diff --git
a/src/keycode.cpp
b/src/keycode.cpp
index d9fc88934cfc4da3a7c2505f206827f132eb2762..990dee339df12113ec3e5d059e7869c7d1984ffb 100644
(file)
--- a/
src/keycode.cpp
+++ b/
src/keycode.cpp
@@
-18,7
+18,6
@@
with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "keycode.h"
*/
#include "keycode.h"
-#include "main.h" // For g_settings
#include "exceptions.h"
#include "settings.h"
#include "log.h"
#include "exceptions.h"
#include "settings.h"
#include "log.h"
@@
-257,7
+256,11
@@
KeyPress::KeyPress() :
KeyPress::KeyPress(const char *name)
{
KeyPress::KeyPress(const char *name)
{
- if (strlen(name) > 4) {
+ if (name[0] == 0) {
+ Key = irr::KEY_KEY_CODES_COUNT;
+ Char = L'\0';
+ return;
+ } else if (strlen(name) > 4) {
try {
Key = keyname_to_keycode(name);
m_name = name;
try {
Key = keyname_to_keycode(name);
m_name = name;