sdl2-compat: Restore log priorities after SDL_Quit

From 4706e73facea0d67ed00394672e366d72d6d0466 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 6 Sep 2024 16:32:58 +0200
Subject: [PATCH] Restore log priorities after SDL_Quit

---
 src/sdl2_compat.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 4e55e88..f369cd9 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -5042,6 +5042,8 @@ SDL_InitSubSystem(Uint32 flags)
 SDL_DECLSPEC void SDLCALL
 SDL_Quit(void)
 {
+    int i;
+    SDL_LogPriority priorities[SDL_LOG_CATEGORY_CUSTOM];
     relative_mouse_mode = SDL2_FALSE;
 
     if (SDL3_WasInit(SDL_INIT_VIDEO)) {
@@ -5089,7 +5091,15 @@ SDL_Quit(void)
         timers = 0;
     }
 
+    for (i = 0; i < SDL_LOG_CATEGORY_CUSTOM; i++) {
+        priorities[i] = SDL3_GetLogPriority(i);
+    }
+
     SDL3_Quit();
+
+    for (i = 0; i < SDL_LOG_CATEGORY_CUSTOM; i++) {
+        SDL3_SetLogPriority(i, priorities[i]);
+    }
 }
 
 SDL_DECLSPEC void SDLCALL