SDL: Don't warn if anyone peeps for events after quitting the event subsystem

From ecaa22cbe66d4153776b381b3357a410199d52a8 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 17 Mar 2022 14:22:51 -0700
Subject: [PATCH] Don't warn if anyone peeps for events after quitting the
 event subsystem

Fixes https://github.com/libsdl-org/SDL/issues/5013
---
 src/events/SDL_events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c
index 4b6fe607887..caa8b87ebd5 100644
--- a/src/events/SDL_events.c
+++ b/src/events/SDL_events.c
@@ -684,7 +684,7 @@ SDL_PeepEventsInternal(SDL_Event * events, int numevents, SDL_eventaction action
     /* Don't look after we've quit */
     if (!SDL_AtomicGet(&SDL_EventQ.active)) {
         /* We get a few spurious events at shutdown, so don't warn then */
-        if (action != SDL_ADDEVENT) {
+        if (action == SDL_GETEVENT) {
             SDL_SetError("The event system has been shut down");
         }
         return (-1);