sdl12-compat: init: Better assertion check for init flags during SDL_Quit().

From 183bac11d2060c68ace55c4396c951c97db4db81 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 1 Sep 2022 11:38:21 -0400
Subject: [PATCH] init: Better assertion check for init flags during
 SDL_Quit().

---
 src/SDL12_compat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 40cb62ea..3956f851 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -2488,13 +2488,14 @@ SDL_QuitSubSystem(Uint32 sdl12flags)
     }
 
     InitializedSubsystems20 &= ~sdl20flags;
+    InitializedSubsystems20 &= ~SDL_INIT_NOPARACHUTE;  /* SDL2 accepts this flag but ignores it. */
 }
 
 DECLSPEC void SDLCALL
 SDL_Quit(void)
 {
     SDL_QuitSubSystem(SDL_WasInit(0) | SDL12_INIT_CDROM);
-    SDL_assert(InitializedSubsystems20 == 0);
+    SDL_assert((InitializedSubsystems20 == 0) || (SDL12Compat_GetHintBoolean("SDL12COMPAT_NO_QUIT_VIDEO", SDL_FALSE) && (InitializedSubsystems20 == SDL_INIT_VIDEO)));
 }
 
 DECLSPEC void SDLCALL