void HandleKey(Key key, int key_status)
{
boolean anyTextGadgetActiveOrJustFinished = anyTextGadgetActive();
+ static boolean ignore_repeated_key = FALSE;
static struct SetupKeyboardInfo ski;
static struct SetupShortcutInfo ssi;
static struct
key_joystick_mapping = 0;
if (key_status == KEY_RELEASED)
+ {
+ // reset flag to ignore repeated "key pressed" events after key release
+ ignore_repeated_key = FALSE;
+
return;
+ }
if ((key == KSYM_F11 ||
((key == KSYM_Return ||
key == KSYM_KP_Enter) && (GetKeyModState() & KMOD_Alt))) &&
- video.fullscreen_available)
+ video.fullscreen_available &&
+ !ignore_repeated_key)
{
setup.fullscreen = !setup.fullscreen;
if (game_status == GAME_MODE_SETUP)
RedrawSetupScreenAfterFullscreenToggle();
+ // set flag to ignore repeated "key pressed" events
+ ignore_repeated_key = TRUE;
+
return;
}