SDL_EventFilter functions now return SDL_bool

This commit is contained in:
Sam Lantinga
2024-08-06 07:36:42 -07:00
parent 57f9c6f7bb
commit 627cb8acd0
8 changed files with 20 additions and 18 deletions

View File

@@ -9,12 +9,12 @@
static int clipboard_update_count;
static int ClipboardEventWatch(void *userdata, SDL_Event *event)
static SDL_bool ClipboardEventWatch(void *userdata, SDL_Event *event)
{
if (event->type == SDL_EVENT_CLIPBOARD_UPDATE) {
++clipboard_update_count;
}
return 0;
return SDL_TRUE;
}
enum

View File

@@ -25,7 +25,7 @@ static int g_userdataValue2 = 2;
#define MAX_ITERATIONS 100
/* Event filter that sets some flags and optionally checks userdata */
static int SDLCALL events_sampleNullEventFilter(void *userdata, SDL_Event *event)
static SDL_bool SDLCALL events_sampleNullEventFilter(void *userdata, SDL_Event *event)
{
g_eventFilterCalled = 1;
@@ -36,7 +36,7 @@ static int SDLCALL events_sampleNullEventFilter(void *userdata, SDL_Event *event
}
}
return 0;
return SDL_TRUE;
}
/**