SDL_EventFilter functions now return SDL_bool
This commit is contained in:
@@ -26,16 +26,16 @@
|
||||
#include "SDL_mouse_c.h"
|
||||
|
||||
|
||||
static int SDLCALL RemoveSupercededWindowEvents(void *userdata, SDL_Event *event)
|
||||
static SDL_bool SDLCALL RemoveSupercededWindowEvents(void *userdata, SDL_Event *event)
|
||||
{
|
||||
SDL_Event *new_event = (SDL_Event *)userdata;
|
||||
|
||||
if (event->type == new_event->type &&
|
||||
event->window.windowID == new_event->window.windowID) {
|
||||
/* We're about to post a new move event, drop the old one */
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
return 1;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
int SDL_SendWindowEvent(SDL_Window *window, SDL_EventType windowevent,
|
||||
|
||||
@@ -363,7 +363,7 @@ static void SDL_PrivateGamepadRemapped(SDL_JoystickID instance_id)
|
||||
/*
|
||||
* Event filter to fire gamepad events from joystick ones
|
||||
*/
|
||||
static int SDLCALL SDL_GamepadEventWatcher(void *userdata, SDL_Event *event)
|
||||
static SDL_bool SDLCALL SDL_GamepadEventWatcher(void *userdata, SDL_Event *event)
|
||||
{
|
||||
SDL_Gamepad *gamepad;
|
||||
|
||||
@@ -422,7 +422,7 @@ static int SDLCALL SDL_GamepadEventWatcher(void *userdata, SDL_Event *event)
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
/* SDL defines sensor orientation relative to the device natural
|
||||
|
||||
@@ -69,7 +69,7 @@ static void SDL_DispatchMainCallbackEvents(void)
|
||||
}
|
||||
}
|
||||
|
||||
static int SDLCALL SDL_MainCallbackEventWatcher(void *userdata, SDL_Event *event)
|
||||
static SDL_bool SDLCALL SDL_MainCallbackEventWatcher(void *userdata, SDL_Event *event)
|
||||
{
|
||||
if (ShouldDispatchImmediately(event)) {
|
||||
// Make sure any currently queued events are processed then dispatch this before continuing
|
||||
@@ -78,7 +78,7 @@ static int SDLCALL SDL_MainCallbackEventWatcher(void *userdata, SDL_Event *event
|
||||
} else {
|
||||
// We'll process this event later from the main event queue
|
||||
}
|
||||
return 0;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
SDL_bool SDL_HasMainCallbacks(void)
|
||||
|
||||
@@ -818,7 +818,7 @@ const char *SDL_GetRenderDriver(int index)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int SDLCALL SDL_RendererEventWatch(void *userdata, SDL_Event *event)
|
||||
static SDL_bool SDLCALL SDL_RendererEventWatch(void *userdata, SDL_Event *event)
|
||||
{
|
||||
SDL_Renderer *renderer = (SDL_Renderer *)userdata;
|
||||
|
||||
@@ -855,7 +855,7 @@ static int SDLCALL SDL_RendererEventWatch(void *userdata, SDL_Event *event)
|
||||
UpdateHDRProperties(renderer);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
int SDL_CreateWindowAndRenderer(const char *title, int width, int height, SDL_WindowFlags window_flags, SDL_Window **window, SDL_Renderer **renderer)
|
||||
|
||||
Reference in New Issue
Block a user