return FALSE;
}
-void HandleEvents()
+static void HandleEvents(void)
{
Event event;
unsigned int event_frame_delay = 0;
}
}
-void HandleMouseCursor()
+static void HandleMouseCursor(void)
{
if (game_status == GAME_MODE_TITLE)
{
}
}
-void ClearEventQueue()
+void ClearAutoRepeatKeyEvents(void)
+{
+ while (PendingEvent())
+ {
+ Event next_event;
+
+ PeekEvent(&next_event);
+
+ /* if event is repeated key press event, remove it from event queue */
+ if (next_event.type == EVENT_KEYPRESS &&
+ next_event.key.repeat)
+ WaitEvent(&next_event);
+ else
+ break;
+ }
+}
+
+void ClearEventQueue(void)
{
Event event;
}
}
-void ClearPlayerMouseAction()
+static void ClearPlayerMouseAction(void)
{
local_player->mouse_action.lx = 0;
local_player->mouse_action.ly = 0;
local_player->mouse_action.button = 0;
}
-void ClearPlayerAction()
+void ClearPlayerAction(void)
{
int i;
ClearPlayerMouseAction();
}
-void SetPlayerMouseAction(int mx, int my, int button)
+static void SetPlayerMouseAction(int mx, int my, int button)
{
int lx = getLevelFromScreenX(mx);
int ly = getLevelFromScreenY(my);
SetTileCursorXY(lx, ly);
}
-void SleepWhileUnmapped()
+void SleepWhileUnmapped(void)
{
boolean window_unmapped = TRUE;
Key key;
} touch_info[NUM_TOUCH_FINGERS];
-void HandleFingerEvent_VirtualButtons(FingerEvent *event)
+static void HandleFingerEvent_VirtualButtons(FingerEvent *event)
{
#if 1
int x = event->x * overlay.grid_xsize;
}
}
-void HandleFingerEvent_WipeGestures(FingerEvent *event)
+static void HandleFingerEvent_WipeGestures(FingerEvent *event)
{
static Key motion_key_x = KSYM_UNDEFINED;
static Key motion_key_y = KSYM_UNDEFINED;
#if defined(TARGET_SDL2)
-static boolean checkTextInputKeyModState()
+static boolean checkTextInputKeyModState(void)
{
// when playing, only handle raw key events and ignore text input
if (game_status == GAME_MODE_PLAYING)
case GAME_MODE_SETUP:
case GAME_MODE_INFO:
case GAME_MODE_SCORES:
+
+ if (anyTextGadgetActiveOrJustFinished && key != KSYM_Escape)
+ break;
+
switch (key)
{
case KSYM_space:
HandleKeysDebug(key);
}
-void HandleNoEvent()
+void HandleNoEvent(void)
{
HandleMouseCursor();
}
}
-void HandleEventActions()
+void HandleEventActions(void)
{
// if (button_status && game_status != GAME_MODE_PLAYING)
if (button_status && (game_status != GAME_MODE_PLAYING ||
}
}
-static int HandleJoystickForAllPlayers()
+static int HandleJoystickForAllPlayers(void)
{
int i;
int result = 0;
return result;
}
-void HandleJoystick()
+void HandleJoystick(void)
{
static unsigned int joytest_delay = 0;
static unsigned int joytest_delay_value = GADGET_FRAME_DELAY;
case GAME_MODE_INFO:
case GAME_MODE_SCORES:
{
+ if (anyTextGadgetActive())
+ break;
+
if (game_status == GAME_MODE_TITLE)
HandleTitleScreen(0,0,dx,dy, newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
else if (game_status == GAME_MODE_MAIN)