Merge SDL-agnostic way to declare callback func. for SDL_SetEventFilter()

This commit is contained in:
Bill Kendrick 2022-05-19 01:36:47 -07:00
parent 16d79a323d
commit dcc699eea1

View file

@ -601,8 +601,13 @@ static void reposition_onscreen_keyboard(int y);
#endif
#endif
#if (SDL_MAJOR_VERSION < 2)
#define EVENT_FILTER_EVENT_TYPE const SDL_Event
#else
#define EVENT_FILTER_EVENT_TYPE union SDL_Event
#endif
int TP_EventFilter(void *data, union SDL_Event * event);
int TP_EventFilter(void *data, EVENT_FILTER_EVENT_TYPE * event);
/* *INDENT-OFF* */
@ -27174,7 +27179,7 @@ static void do_lock_file(void)
free(lock_fname);
}
int TP_EventFilter(__attribute__((unused)) void *data, union SDL_Event * event)
int TP_EventFilter(__attribute__((unused)) void *data, EVENT_FILTER_EVENT_TYPE * event)
/**
* FIXME
*/