sdl2-compat: apply commit 5e1c0e3e8eab to SDL_CreateShapedWindow, too

From 2e01dc2167d0b71bccfcfd388fd0383052fabffc Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 6 Mar 2023 23:23:40 +0300
Subject: [PATCH] apply commit 5e1c0e3e8eab to SDL_CreateShapedWindow, too

---
 src/sdl2_compat.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 4307c2d..0f62932 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -4434,16 +4434,15 @@ DECLSPEC SDL_Window * SDLCALL
 SDL_CreateShapedWindow(const char *title, unsigned int x, unsigned int y, unsigned int w, unsigned int h, Uint32 flags)
 {
     SDL_Window *window;
-    int setpos = (x != SDL_WINDOWPOS_UNDEFINED || y != SDL_WINDOWPOS_UNDEFINED);
     int hidden = flags & SDL_WINDOW_HIDDEN;
 
-    if (setpos) {
-        flags |= SDL_WINDOW_HIDDEN;
-    }
+    flags |= SDL_WINDOW_HIDDEN;
 
     window = SDL3_CreateShapedWindow(title, (int)w, (int)h, flags);
-    if (window && setpos) {
-        SDL3_SetWindowPosition(window, (int)x, (int)y);
+    if (window) {
+        if (!SDL_WINDOWPOS_ISUNDEFINED(x) || !SDL_WINDOWPOS_ISUNDEFINED(y)) {
+            SDL3_SetWindowPosition(window, (int)x, (int)y);
+        }
         if (!hidden) {
             SDL3_ShowWindow(window);
         }