[Change] Some default key bindings to avoid problems with some SDL versions.
This commit is contained in:
parent
a234593091
commit
64e9e2e674
46
src/input.c
46
src/input.c
@ -46,34 +46,34 @@ extern int show_fps;
|
|||||||
/* Set the default input keys. */
|
/* Set the default input keys. */
|
||||||
void input_setDefault(void) {
|
void input_setDefault(void) {
|
||||||
/* Movement. */
|
/* Movement. */
|
||||||
input_setKeybind("accel", KEYBIND_KEYBOARD, SDLK_w, 0);
|
input_setKeybind("accel", KEYBIND_KEYBOARD, SDLK_w, 0);
|
||||||
input_setKeybind("left", KEYBIND_KEYBOARD, SDLK_a, 0);
|
input_setKeybind("left", KEYBIND_KEYBOARD, SDLK_a, 0);
|
||||||
input_setKeybind("right", KEYBIND_KEYBOARD, SDLK_d, 0);
|
input_setKeybind("right", KEYBIND_KEYBOARD, SDLK_d, 0);
|
||||||
input_setKeybind("reverse", KEYBIND_KEYBOARD, SDLK_s, 0);
|
input_setKeybind("reverse", KEYBIND_KEYBOARD, SDLK_s, 0);
|
||||||
input_setKeybind("target", KEYBIND_KEYBOARD, SDLK_TAB, 0);
|
input_setKeybind("target", KEYBIND_KEYBOARD, SDLK_TAB, 0);
|
||||||
input_setKeybind("target_nearest", KEYBIND_KEYBOARD, SDLK_t, 0);
|
input_setKeybind("target_nearest", KEYBIND_KEYBOARD, SDLK_t, 0);
|
||||||
input_setKeybind("target_hostile", KEYBIND_KEYBOARD, SDLK_r, 0);
|
input_setKeybind("target_hostile", KEYBIND_KEYBOARD, SDLK_r, 0);
|
||||||
/* Combat. */
|
/* Combat. */
|
||||||
input_setKeybind("primary", KEYBIND_KEYBOARD, SDLK_SPACE, 0);
|
input_setKeybind("primary", KEYBIND_KEYBOARD, SDLK_SPACE, 0);
|
||||||
input_setKeybind("face", KEYBIND_KEYBOARD, SDLK_f, 0);
|
input_setKeybind("face", KEYBIND_KEYBOARD, SDLK_f, 0);
|
||||||
input_setKeybind("board", KEYBIND_KEYBOARD, SDLK_b, 0);
|
input_setKeybind("board", KEYBIND_KEYBOARD, SDLK_b, 0);
|
||||||
/* Secondary weapon. */
|
/* Secondary weapon. */
|
||||||
input_setKeybind("secondary", KEYBIND_KEYBOARD, SDLK_LSHIFT, 0);
|
input_setKeybind("secondary", KEYBIND_KEYBOARD, SDLK_LSHIFT, 0);
|
||||||
input_setKeybind("secondary_next", KEYBIND_KEYBOARD, SDLK_e, 0);
|
input_setKeybind("secondary_next", KEYBIND_KEYBOARD, SDLK_e, 0);
|
||||||
/* Space */
|
/* Space */
|
||||||
input_setKeybind("target_planet", KEYBIND_KEYBOARD, SDLK_p, 0);
|
input_setKeybind("target_planet", KEYBIND_KEYBOARD, SDLK_p, 0);
|
||||||
input_setKeybind("land", KEYBIND_KEYBOARD, SDLK_l, 0);
|
input_setKeybind("land", KEYBIND_KEYBOARD, SDLK_l, 0);
|
||||||
input_setKeybind("thyperspace", KEYBIND_KEYBOARD, SDLK_h, 0);
|
input_setKeybind("thyperspace", KEYBIND_KEYBOARD, SDLK_h, 0);
|
||||||
input_setKeybind("starmap", KEYBIND_KEYBOARD, SDLK_m, 0);
|
input_setKeybind("starmap", KEYBIND_KEYBOARD, SDLK_m, 0);
|
||||||
input_setKeybind("jump", KEYBIND_KEYBOARD, SDLK_j, 0);
|
input_setKeybind("jump", KEYBIND_KEYBOARD, SDLK_j, 0);
|
||||||
|
|
||||||
/* Misc. */
|
/* Misc. */
|
||||||
input_setKeybind("mapzoomin", KEYBIND_KEYBOARD, SDLK_0, 0);
|
input_setKeybind("mapzoomin", KEYBIND_KEYBOARD, SDLK_KP_PLUS, 0);
|
||||||
input_setKeybind("mapzoomout", KEYBIND_KEYBOARD, SDLK_9, 0);
|
input_setKeybind("mapzoomout", KEYBIND_KEYBOARD, SDLK_KP_MINUS, 0);
|
||||||
input_setKeybind("screenshot", KEYBIND_KEYBOARD, SDLK_F12, 0);
|
input_setKeybind("screenshot", KEYBIND_KEYBOARD, SDLK_KP_MULTIPLY, 0);
|
||||||
input_setKeybind("pause", KEYBIND_KEYBOARD, SDLK_F1, 0);
|
input_setKeybind("pause", KEYBIND_KEYBOARD, SDLK_F1, 0);
|
||||||
input_setKeybind("menu", KEYBIND_KEYBOARD, SDLK_ESCAPE, 0);
|
input_setKeybind("menu", KEYBIND_KEYBOARD, SDLK_ESCAPE, 0);
|
||||||
input_setKeybind("info", KEYBIND_KEYBOARD, SDLK_i, 0);
|
input_setKeybind("info", KEYBIND_KEYBOARD, SDLK_i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialization/exit functions (does not assign keys). */
|
/* Initialization/exit functions (does not assign keys). */
|
||||||
|
Loading…
Reference in New Issue
Block a user