}
}
-void HandleKeysDebug(Key key)
+boolean HandleKeysDebug(Key key, int key_status)
{
#ifdef DEBUG
int i;
+ if (key_status != KEY_PRESSED)
+ return FALSE;
+
if (game_status == GAME_MODE_PLAYING || !setup.debug.frame_delay_game_only)
{
boolean mod_key_pressed = ((GetKeyModState() & KMOD_Valid) != KMOD_None);
else
Error(ERR_DEBUG, "frame delay == 0 ms (maximum speed)");
- break;
+ return TRUE;
}
}
}
Error(ERR_DEBUG, "debug mode %s",
(options.debug ? "enabled" : "disabled"));
+
+ return TRUE;
}
else if (key == KSYM_v)
{
Error(ERR_DEBUG, "currently using game engine version %d",
game.engine_version);
+
+ return TRUE;
}
}
+
+ return FALSE;
#endif
}
int joy = 0;
int i;
+ if (HandleKeysDebug(key, key_status))
+ return; // do not handle already processed keys again
+
// map special keys (media keys / remote control buttons) to default keys
if (key == KSYM_PlayPause)
key = KSYM_space;
return;
}
}
-
- HandleKeysDebug(key);
}
void HandleNoEvent(void)
void HandleFingerEvent(FingerEvent *);
void HandleTextEvent(TextEvent *);
void HandlePauseResumeEvent(PauseResumeEvent *);
-void HandleKeysDebug(Key);
+boolean HandleKeysDebug(Key, int);
void HandleKeyEvent(KeyEvent *);
void HandleFocusEvent(FocusChangeEvent *);
void HandleClientMessageEvent(ClientMessageEvent *);