From 90f0859128774fdf270821e53fca5eabc0c5b8bf Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 11 May 2014 02:57:47 +0200 Subject: [PATCH] Fix error messages beeing shown on pressing cursor keys in various menus --- src/game.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/game.cpp b/src/game.cpp index 8a0aa177..0b28c7d1 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -193,6 +193,14 @@ struct LocalFormspecHandler : public TextDest } } + // don't show error message for unhandled cursor keys + if ( (fields.find("key_up") != fields.end()) || + (fields.find("key_down") != fields.end()) || + (fields.find("key_left") != fields.end()) || + (fields.find("key_right") != fields.end())) { + return; + } + errorstream << "LocalFormspecHandler::gotText unhandled >" << m_formname << "< event" << std::endl; int i = 0; for (std::map::iterator iter = fields.begin(); -- 2.30.2