Document that you can pass NULL to SDL_PeepEvents()
Fixes https://github.com/libsdl-org/sdlwiki/issues/547
This commit is contained in:
@@ -878,6 +878,10 @@ static int SDL_PeepEventsInternal(SDL_Event *events, int numevents, SDL_EventAct
|
||||
return -1;
|
||||
}
|
||||
if (action == SDL_ADDEVENT) {
|
||||
if (!events) {
|
||||
SDL_UnlockMutex(SDL_EventQ.lock);
|
||||
return SDL_InvalidParamError("events");
|
||||
}
|
||||
for (i = 0; i < numevents; ++i) {
|
||||
used += SDL_AddEvent(&events[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user