summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-12 16:03:52 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-12 16:03:52 +0000
commit81567749246fd4f3fb3a9c1fdbaae41327459612 (patch)
tree2dd71710e2f2e0feddbc5a066a1ee0dd05f53cf4 /src
parent3262d5319c5f2cc830b3b783880df4b1b5d95710 (diff)
downloadmana-client-81567749246fd4f3fb3a9c1fdbaae41327459612.tar.gz
mana-client-81567749246fd4f3fb3a9c1fdbaae41327459612.tar.bz2
mana-client-81567749246fd4f3fb3a9c1fdbaae41327459612.tar.xz
mana-client-81567749246fd4f3fb3a9c1fdbaae41327459612.zip
Worked around a Guichan exception thrown for mice with many buttons (patch by
Roel van Dijk).
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp14
1 files changed, 12 insertions, 2 deletions
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 <string>
#include <guichan/sdl/sdlinput.hpp>
+#include <guichan/exception.hpp>
#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