diff options
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); } } |