Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-05 22:23:15 +0000
committerStijn Buys <ingar@osirion.org>2008-02-05 22:23:15 +0000
commit1ed2e8eb1f1909a35f6fc8d5d6065bcac37c27ea (patch)
treebb1007c12c205b265c1e7515cdc7924496e19cf3 /src/client/console.cc
parenta51deebd87036ceb87c77a20117977d077b771e3 (diff)
keyboard handling, cvar fixes
Diffstat (limited to 'src/client/console.cc')
-rw-r--r--src/client/console.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/console.cc b/src/client/console.cc
index bf193e5..d10be50 100644
--- a/src/client/console.cc
+++ b/src/client/console.cc
@@ -6,6 +6,7 @@
#include "client/console.h"
#include "client/video.h"
+#include "client/keys.h"
#include "core/core.h"
#include "render/render.h"
@@ -159,9 +160,9 @@ void toggle()
console_visible = !console_visible;
}
-void handle_keypressed(SDL_keysym* keysym)
+void keypressed(const SDL_keysym &keysym)
{
- switch( keysym->sym ) {
+ switch( keysym.sym ) {
case SDLK_RETURN:
if (input.size()) {
core::cmd << input << std::endl;
@@ -177,8 +178,8 @@ void handle_keypressed(SDL_keysym* keysym)
break;
}
- if (keysym->sym >= 32 && keysym->sym <= 175) {
- input += (char) keysym->sym;
+ if ((keysym.sym >= 32 ) && (keysym.sym <175)) {
+ input += keysym_to_char(keysym);
}
}