diff --git a/config.cpp b/config.cpp index 3a7cdb7e..0adcc10d 100644 --- a/config.cpp +++ b/config.cpp @@ -1589,7 +1589,7 @@ EX void initConfig() { -> help("Background particle effects, e.g., in the Blizzard."); // control - #if CAP_SDL + #if CAP_SDLJOY param_enum(joy_init, "joyinit", jiFast) ->editable({{"off", "do not use joysticks"}, {"fast", "do not wait until the joysticks are initialized"}, {"wait", "wait until the joysticks are initialized"}}, "joystick initialization", 'j'); param_i(vid.joyvalue, "vid.joyvalue", 4800); diff --git a/control.cpp b/control.cpp index 63c82b22..43223f7e 100644 --- a/control.cpp +++ b/control.cpp @@ -742,6 +742,7 @@ EX void handleKeyNormal(int sym, int uni) { sym = 0; uni = 0; } if(sym == 'f' || is_joy_index(sym, deck::key_f)) bow::switch_fire_mode(); + #if CAP_SDLJOY if(sym == '`' || is_joy_index(sym, deck::enter)) { flashMessages(); movepcto(joydir); @@ -749,6 +750,7 @@ EX void handleKeyNormal(int sym, int uni) { joytime = -1; checkjoy(); } + #endif } if(sym == SDLK_KP5 && DEFAULTCONTROL && !game_keys_scroll) movepcto(-1, 1); @@ -1121,11 +1123,13 @@ EX void mainloopiter() { hiliteclick = keystate[SDLK_LALT] | keystate[SDLK_RALT]; #endif + #if CAP_SDLJOY if(defaultjoy) for(auto& s: sticks) { if(gjoy_button(s, deck::key_control)) lctrlclick = true; if(gjoy_button(s, deck::key_alt)) hiliteclick = true; if(gjoy_button(s, deck::key_shift)) lshiftclick = true; } + #endif anyshiftclick = lshiftclick | rshiftclick; anyctrlclick = lctrlclick | rctrlclick; diff --git a/multi.cpp b/multi.cpp index d1614bd5..3113f310 100644 --- a/multi.cpp +++ b/multi.cpp @@ -534,10 +534,10 @@ struct shmup_configurer { } else dialog::addBreak(100); } + + add_edit(joy_init); #endif - add_edit(joy_init); - if(haveconfig && !shmup::on) add_edit(multi::multi_autojoy); dialog::addBreak(50);