diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-05 20:44:36 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-05 20:44:36 +0000 |
commit | a51deebd87036ceb87c77a20117977d077b771e3 (patch) | |
tree | 71217d051fe77b562cd92508fe9edb3da6b7cc7a /src/client/input.cc | |
parent | 8ee5d47d7e1336eb69064ca31e27bbfa7d86b51e (diff) |
fixed cvar, added cvars r_width r_height r_fullscreen, added function r_restart
Diffstat (limited to 'src/client/input.cc')
-rw-r--r-- | src/client/input.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/input.cc b/src/client/input.cc index 91f462c..9bcf4fe 100644 --- a/src/client/input.cc +++ b/src/client/input.cc @@ -23,8 +23,8 @@ void init() con_print << "Initializing input..." << std::endl; //condebug << "SDL_DEFAULT_REPEAT_DELAY " << SDL_DEFAULT_REPEAT_DELAY << std::endl; - //SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); - SDL_EnableKeyRepeat(10, SDL_DEFAULT_REPEAT_INTERVAL); + SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); + //SDL_EnableKeyRepeat(10, SDL_DEFAULT_REPEAT_INTERVAL); } void shutdown() @@ -99,7 +99,10 @@ void frame(float seconds) client::application.shutdown(); } */ - if (core::connected() && !console::visible()) { + if (console::visible()) { + // send key events to the console + console::handle_keypressed( &event.key.keysym ); + } else if (core::connected()) { // send key events to the game world handle_keypressed( &event.key.keysym ); } @@ -108,10 +111,7 @@ void frame(float seconds) case SDL_KEYUP: if (event.key.keysym.sym == '`' || event.key.keysym.sym == '~') { console::toggle(); - } else if (console::visible()) { - // send key events to the console - console::handle_keyreleased( &event.key.keysym ); - } else if (core::connected()) { + } else if (!console::visible() && core::connected()) { // send key events to the game world handle_keyreleased( &event.key.keysym ); } |