sdl2-compat: Fixed testautomation --filter video_getSetWindow[Minimum|Maximum]Size

From 9e2966d509a4803e0271faf1d28292bfb62848fd Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 7 Aug 2023 23:15:13 -0700
Subject: [PATCH] Fixed testautomation --filter
 video_getSetWindow[Minimum|Maximum]Size

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

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index efa47f5..4fa9680 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -5371,12 +5371,36 @@ SDL_SetWindowSize(SDL_Window *window, int w, int h)
 DECLSPEC void SDLCALL
 SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h)
 {
+    if (!window) {
+        SDL_SetError("Invalid window");
+        return;
+    }
+    if (min_w <= 0) {
+        SDL3_InvalidParamError("min_w");
+        return;
+    }
+    if (min_h <= 0) {
+        SDL3_InvalidParamError("min_h");
+        return;
+    }
     SDL3_SetWindowMinimumSize(window, min_w, min_h);
 }
 
 DECLSPEC void SDLCALL
 SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h)
 {
+    if (!window) {
+        SDL_SetError("Invalid window");
+        return;
+    }
+    if (max_w <= 0) {
+        SDL3_InvalidParamError("max_w");
+        return;
+    }
+    if (max_h <= 0) {
+        SDL3_InvalidParamError("max_h");
+        return;
+    }
     SDL3_SetWindowMaximumSize(window, max_w, max_h);
 }