diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-05 22:23:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-05 22:23:15 +0000 |
commit | 1ed2e8eb1f1909a35f6fc8d5d6065bcac37c27ea (patch) | |
tree | bb1007c12c205b265c1e7515cdc7924496e19cf3 /src/client/console.cc | |
parent | a51deebd87036ceb87c77a20117977d077b771e3 (diff) |
keyboard handling, cvar fixes
Diffstat (limited to 'src/client/console.cc')
-rw-r--r-- | src/client/console.cc | 9 |
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); } } |