X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=6f6d41faa580f6ddf393613752fcb6434c91e725;hb=4e4b7a3f5581e495af3d0bcf0ca8bb5424306a52;hp=6671041620077893cc02078bc6a72725057c0f64;hpb=d870b82d2c53def1ed6da9fdc46ce6bf3dd1bfae;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index 66710416..6f6d41fa 100644 --- a/src/events.c +++ b/src/events.c @@ -378,6 +378,8 @@ void ClearPlayerAction() key_joystick_mapping = 0; for (i = 0; i < MAX_PLAYERS; i++) stored_player[i].action = 0; + + ClearJoystickState(); } void SleepWhileUnmapped() @@ -1558,6 +1560,9 @@ void HandleKey(Key key, int key_status) static boolean element_dropped[MAX_PLAYERS] = { FALSE,FALSE,FALSE,FALSE }; int pnr; + /* initialize unifying snap and drop buttons (EM engine) */ + game_em.use_single_button = game_em.use_single_button_initial; + for (pnr = 0; pnr < MAX_PLAYERS; pnr++) { byte key_action = 0; @@ -1604,6 +1609,9 @@ void HandleKey(Key key, int key_status) if (tape.single_step && tape.recording && tape.pausing) { + /* do not unify snap and drop buttons in single-step mode (EM engine) */ + game_em.use_single_button = FALSE; + if (key_status == KEY_PRESSED && key_action & KEY_MOTION) { TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);