SDL_Joystick *joy;
int joy_id;
int axis_keydown[2];
-#ifdef SDL_REDRAW_EVT
int redraw;
SDL_Event revent;
-#endif
SDL_Event mevent; // last mouse event
keybits_t keystate[SDLK_LAST / KEYBITS_WORD_BITS + 1];
// emulator keys should always be processed immediately lest one is lost
SDL_PushEvent(event);
break;
default:
-#ifdef SDL_REDRAW_EVT
if (event->type == SDL_VIDEORESIZE) {
state->redraw = 1;
state->revent = *event;
state->revent.type = SDL_VIDEOEXPOSE;
}
} else
-#endif
if ((event->type == SDL_MOUSEBUTTONDOWN) ||
(event->type == SDL_MOUSEBUTTONUP)) {
int mask = SDL_BUTTON(event->button.button);
}
}
-#ifdef SDL_REDRAW_EVT
// if the event queue has been emptied and resize/expose events were in it
if (state->redraw && count == 0) {
if (ext_event_handler != NULL)
if (one_down != NULL)
*one_down = 1;
} else
-#endif
i++;
// don't lose events other devices might want to handle
if (i < count)
}
else
{
-#ifdef SDL_REDRAW_EVT
if (keycode == SDLK_UNKNOWN)
ret = PBTN_RDRAW;
else
-#endif
for (i = 0; i < map_len; i++) {
if (map[i].key == keycode) {
ret = map[i].pbtn;
if (in_have_async_devs) {
result = in_update_kc_async(&dev_id, &is_down, timeout_ms);
if (result == -1) {
-#ifdef SDL_REDRAW_EVT
// no key up event for RDRAW, clear to avoid key repeat
menu_key_state &= ~PBTN_RDRAW;
-#endif
return -1;
}
drv = &DRV(in_devices[dev_id].drv_id);
wait = autorep_delay_ms;
/* wait until either key repeat or a new key has been pressed */
-#ifdef SDL_REDRAW_EVT
interesting |= PBTN_RDRAW;
-#endif
do {
ret = in_menu_wait_any(charcode, wait);
if (ret == 0 || ret != menu_key_prev)