X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=f67bc13ecac7dc8bb5d3aed4e151383cea5b7439;hb=69e8efac8d856859c55237e085ff8b514ae1aa3c;hp=a4b60829e90a139f35aeff1bc19a9cbfab278b3e;hpb=2443a8a09966a9940e1420c91d24a297325c2a00;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index a4b60829..f67bc13e 100644 --- a/src/events.c +++ b/src/events.c @@ -176,6 +176,16 @@ void ClearEventQueue() } } +void ClearPlayerAction() +{ + int i; + + /* simulate key release events for still pressed keys */ + key_joystick_mapping = 0; + for (i=0; itype == EVENT_FOCUSOUT) { - int i; - KeyboardAutoRepeatOn(); old_joystick_status = joystick.status; joystick.status = JOYSTICK_NOT_AVAILABLE; - /* simulate key release events for still pressed keys */ - key_joystick_mapping = 0; - for (i=0; itype == EVENT_FOCUSIN) { @@ -594,7 +599,7 @@ void HandleKey(Key key, int key_status) switch(key) { case KSYM_Escape: - RequestQuitGame(); + RequestQuitGame(setup.ask_on_escape); break; #ifdef DEBUG @@ -771,11 +776,9 @@ static int HandleJoystickForAllPlayers() joy_action = Joystick(i); result |= joy_action; - if (!setup.input[i].use_joystick) continue; - stored_player[i].action = joy_action; }