fixed handling of modifier keys for debug key shortcuts
authorHolger Schemel <info@artsoft.org>
Thu, 16 Jun 2016 21:51:37 +0000 (23:51 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 16 Jun 2016 21:51:48 +0000 (23:51 +0200)
src/events.c

index c743a8b09e5a17b3c7b5e5f36ba04cc695b7cf8e..d749ad3dca9ccc27e5cdbef86d90e6640fd71ed9 100644 (file)
@@ -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);