mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 07:00:48 +00:00
events: fix SDL_PeepEvents() returning 0 on error
Signed-off-by: Amelia Clarke <selene@perilune.dev>
This commit is contained in:
parent
625d090243
commit
defd7895da
1 changed files with 2 additions and 1 deletions
|
|
@ -1167,7 +1167,8 @@ static int SDL_PeepEventsInternal(SDL_Event *events, int numevents, SDL_EventAct
|
|||
if (action == SDL_ADDEVENT) {
|
||||
CHECK_PARAM(!events) {
|
||||
SDL_UnlockMutex(SDL_EventQ.lock);
|
||||
return SDL_InvalidParamError("events");
|
||||
SDL_InvalidParamError("events");
|
||||
return -1;
|
||||
}
|
||||
for (i = 0; i < numevents; ++i) {
|
||||
used += SDL_AddEvent(&events[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue