From: Holger Schemel Date: Thu, 16 Jun 2016 21:51:37 +0000 (+0200) Subject: fixed handling of modifier keys for debug key shortcuts X-Git-Tag: 4.0.0.0-rc3~3 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8a383c7596b43a99276cbd82d0b21cbf12588a33;p=rocksndiamonds.git fixed handling of modifier keys for debug key shortcuts --- diff --git a/src/events.c b/src/events.c index c743a8b0..d749ad3d 100644 --- a/src/events.c +++ b/src/events.c @@ -1209,14 +1209,12 @@ void HandleKeysDebug(Key key) if (game_status == GAME_MODE_PLAYING || !setup.debug.frame_delay_game_only) { - boolean mod_key_pressed = ((GetKeyModState() & KMOD_Control) || - (GetKeyModState() & KMOD_Alt) || - (GetKeyModState() & KMOD_Meta)); + boolean mod_key_pressed = (GetKeyModState() != KMOD_None); for (i = 0; i < NUM_DEBUG_FRAME_DELAY_KEYS; i++) { if (key == setup.debug.frame_delay_key[i] && - (mod_key_pressed || !setup.debug.frame_delay_use_mod_key)) + (mod_key_pressed == setup.debug.frame_delay_use_mod_key)) { GameFrameDelay = (GameFrameDelay != setup.debug.frame_delay[i] ? setup.debug.frame_delay[i] : GAME_FRAME_DELAY);