From 8404143afe48c04e0c84a9bbde08ebf400b7f7fb Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Mon, 20 Oct 2008 17:47:42 +0000 Subject: added SDL support --- src/game/client/components/binds.cpp | 14 ++++++++++++-- src/game/client/components/console.cpp | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src/game/client') diff --git a/src/game/client/components/binds.cpp b/src/game/client/components/binds.cpp index b55e7333..de5f4f05 100644 --- a/src/game/client/components/binds.cpp +++ b/src/game/client/components/binds.cpp @@ -6,7 +6,7 @@ bool BINDS::BINDS_SPECIAL::on_input(INPUT_EVENT e) { // don't handle invalid events and keys that arn't set to anything - if(e.key >= KEY_F1 && e.key <= KEY_F25 && binds->keybindings[e.key][0] != 0) + if(e.key >= KEY_F1 && e.key <= KEY_F15 && binds->keybindings[e.key][0] != 0) { int stroke = 0; if(e.flags&INPFLAG_PRESS) @@ -86,9 +86,14 @@ void BINDS::set_defaults() bind(KEY_F2, "toggle_remote_console"); bind(KEY_TAB, "+scoreboard"); bind(KEY_F10, "screenshot"); - + +#ifdef CONFIG_NO_SDL bind('A', "+left"); bind('D', "+right"); +#else + bind('a', "+left"); + bind('d', "+right"); +#endif bind(KEY_SPACE, "+jump"); bind(KEY_MOUSE_1, "+fire"); bind(KEY_MOUSE_2, "+hook"); @@ -103,8 +108,13 @@ void BINDS::set_defaults() bind(KEY_MOUSE_WHEEL_UP, "+prevweapon"); bind(KEY_MOUSE_WHEEL_DOWN, "+nextweapon"); +#ifdef CONFIG_NO_SDL bind('T', "chat all"); bind('Y', "chat team"); +#else + bind('t', "chat all"); + bind('y', "chat team"); +#endif bind(KEY_F3, "vote yes"); bind(KEY_F4, "vote no"); diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp index c8fe018e..71653fdf 100644 --- a/src/game/client/components/console.cpp +++ b/src/game/client/components/console.cpp @@ -295,7 +295,7 @@ bool CONSOLE::on_input(INPUT_EVENT e) { if(console_state == CONSOLE_CLOSED) return false; - if(e.key >= KEY_F1 && e.key <= KEY_F25) + if(e.key >= KEY_F1 && e.key <= KEY_F15) return false; if(e.key == KEY_ESC && (e.flags&INPFLAG_PRESS)) -- cgit 1.4.1