From 81567749246fd4f3fb3a9c1fdbaae41327459612 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 12 Nov 2006 16:03:52 +0000 Subject: Worked around a Guichan exception thrown for mice with many buttons (patch by Roel van Dijk). --- src/game.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game.cpp b/src/game.cpp index b07c5c9a..ba65298f 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -29,6 +29,7 @@ #include #include +#include #include "beingmanager.h" #include "configuration.h" @@ -627,8 +628,17 @@ void Game::handleInput() } // Push input to GUI when not used - if (!used) { - guiInput->pushInput(event); + if (!used) + { + try + { + guiInput->pushInput(event); + } + catch (gcn::Exception e) + { + const char* err = e.getMessage().c_str(); + logger->log("Warning: guichan input exception: %s", err); + } } } // End while -- cgit v1.2.3-70-g09d2