Skip to content

Commit

Permalink
Fixed bug 3744 - missing SDLCALL in several functions
Browse files Browse the repository at this point in the history
Ozkan Sezer

The attached patch adds missing SDLCALL to several functions, so that
they properly match the headers as intended.
  • Loading branch information
slouken committed Aug 14, 2017
1 parent e54eede commit ca5c304
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/SDL_assert.c
Expand Up @@ -49,7 +49,7 @@
#endif


static SDL_assert_state
static SDL_assert_state SDLCALL
SDL_PromptAssertion(const SDL_assert_data *data, void *userdata);

/*
Expand Down Expand Up @@ -141,7 +141,7 @@ static SDL_NORETURN void SDL_AbortAssertion(void)
}


static SDL_assert_state
static SDL_assert_state SDLCALL
SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
{
#ifdef __WIN32__
Expand Down
8 changes: 4 additions & 4 deletions src/events/SDL_windowevents.c
Expand Up @@ -28,7 +28,7 @@
#include "../video/SDL_sysvideo.h"


static int
static int SDLCALL
RemovePendingResizedEvents(void * userdata, SDL_Event *event)
{
SDL_Event *new_event = (SDL_Event *)userdata;
Expand All @@ -42,7 +42,7 @@ RemovePendingResizedEvents(void * userdata, SDL_Event *event)
return 1;
}

static int
static int SDLCALL
RemovePendingSizeChangedEvents(void * userdata, SDL_Event *event)
{
SDL_Event *new_event = (SDL_Event *)userdata;
Expand All @@ -56,7 +56,7 @@ RemovePendingSizeChangedEvents(void * userdata, SDL_Event *event)
return 1;
}

static int
static int SDLCALL
RemovePendingMoveEvents(void * userdata, SDL_Event *event)
{
SDL_Event *new_event = (SDL_Event *)userdata;
Expand All @@ -70,7 +70,7 @@ RemovePendingMoveEvents(void * userdata, SDL_Event *event)
return 1;
}

static int
static int SDLCALL
RemovePendingExposedEvents(void * userdata, SDL_Event *event)
{
SDL_Event *new_event = (SDL_Event *)userdata;
Expand Down
2 changes: 1 addition & 1 deletion src/joystick/SDL_gamecontroller.c
Expand Up @@ -333,7 +333,7 @@ static void HandleJoystickHat(SDL_GameController *gamecontroller, int hat, Uint8
/*
* Event filter to fire controller events from joystick ones
*/
static int SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event)
static int SDLCALL SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event)
{
switch(event->type) {
case SDL_JOYAXISMOTION:
Expand Down
2 changes: 1 addition & 1 deletion src/render/SDL_render.c
Expand Up @@ -102,7 +102,7 @@ SDL_GetRenderDriverInfo(int index, SDL_RendererInfo * info)
#endif
}

static int
static int SDLCALL
SDL_RendererEventWatch(void *userdata, SDL_Event *event)
{
SDL_Renderer *renderer = (SDL_Renderer *)userdata;
Expand Down
2 changes: 1 addition & 1 deletion src/timer/SDL_timer.c
Expand Up @@ -97,7 +97,7 @@ SDL_AddTimerInternal(SDL_TimerData *data, SDL_Timer *timer)
timer->next = curr;
}

static int
static int SDLCALL
SDL_TimerThread(void *_data)
{
SDL_TimerData *data = (SDL_TimerData *)_data;
Expand Down
8 changes: 4 additions & 4 deletions test/testatomic.c
Expand Up @@ -117,7 +117,7 @@ static SDL_atomic_t threadsRunning;
static SDL_sem *threadDone;

static
int adder(void* junk)
int SDLCALL adder(void* junk)
{
unsigned long N=NInter;
SDL_Log("Thread subtracting %d %lu times\n",CountInc,N);
Expand Down Expand Up @@ -495,7 +495,7 @@ typedef struct
char padding[SDL_CACHELINE_SIZE-(sizeof(SDL_EventQueue*)+sizeof(int)*NUM_WRITERS+sizeof(int)+sizeof(SDL_bool))%SDL_CACHELINE_SIZE];
} ReaderData;

static int FIFO_Writer(void* _data)
static int SDLCALL FIFO_Writer(void* _data)
{
WriterData *data = (WriterData *)_data;
SDL_EventQueue *queue = data->queue;
Expand Down Expand Up @@ -530,7 +530,7 @@ static int FIFO_Writer(void* _data)
return 0;
}

static int FIFO_Reader(void* _data)
static int SDLCALL FIFO_Reader(void* _data)
{
ReaderData *data = (ReaderData *)_data;
SDL_EventQueue *queue = data->queue;
Expand Down Expand Up @@ -570,7 +570,7 @@ static int FIFO_Reader(void* _data)

#ifdef TEST_SPINLOCK_FIFO
/* This thread periodically locks the queue for no particular reason */
static int FIFO_Watcher(void* _data)
static int SDLCALL FIFO_Watcher(void* _data)
{
SDL_EventQueue *queue = (SDL_EventQueue *)_data;

Expand Down
2 changes: 1 addition & 1 deletion test/testautomation_audio.c
Expand Up @@ -46,7 +46,7 @@ int _audio_testCallbackLength;


/* Test callback function */
void _audio_testCallback(void *userdata, Uint8 *stream, int len)
void SDLCALL _audio_testCallback(void *userdata, Uint8 *stream, int len)
{
/* track that callback was called */
_audio_testCallbackCounter++;
Expand Down
2 changes: 1 addition & 1 deletion test/testautomation_events.c
Expand Up @@ -25,7 +25,7 @@ int _userdataValue1 = 1;
int _userdataValue2 = 2;

/* Event filter that sets some flags and optionally checks userdata */
int _events_sampleNullEventFilter(void *userdata, SDL_Event *event)
int SDLCALL _events_sampleNullEventFilter(void *userdata, SDL_Event *event)
{
_eventFilterCalled = 1;

Expand Down
2 changes: 1 addition & 1 deletion test/testautomation_timer.c
Expand Up @@ -104,7 +104,7 @@ timer_delayAndGetTicks(void *arg)
}

/* Test callback */
Uint32 _timerTestCallback(Uint32 interval, void *param)
Uint32 SDLCALL _timerTestCallback(Uint32 interval, void *param)
{
_timerCallbackCalled = 1;

Expand Down
2 changes: 1 addition & 1 deletion test/testhittesting.c
Expand Up @@ -14,7 +14,7 @@ const SDL_Rect drag_areas[] = {
static const SDL_Rect *areas = drag_areas;
static int numareas = SDL_arraysize(drag_areas);

static SDL_HitTestResult
static SDL_HitTestResult SDLCALL
hitTest(SDL_Window *window, const SDL_Point *pt, void *data)
{
int i;
Expand Down
2 changes: 1 addition & 1 deletion test/testmessage.c
Expand Up @@ -25,7 +25,7 @@ quit(int rc)
exit(rc);
}

static int
static int SDLCALL
button_messagebox(void *eventNumber)
{
const SDL_MessageBoxButtonData buttons[] = {
Expand Down

0 comments on commit ca5c304

Please sign in to comment.