From f650a62c88cf05ea36b1e890a365b0f7c05d8a9f Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 6 Mar 2023 22:15:00 +0300
Subject: [PATCH] further revise the SDL_CreateWindow changes after commit
521449ff.
---
src/sdl2_compat.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 3d4fcc9..973d036 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -4422,15 +4422,12 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
}
window = SDL3_CreateWindow(title, w, h, flags);
- if (window) {
- if (setpos) {
- SDL3_SetWindowPosition(window, x, y);
- }
+ if (window && setpos) {
+ SDL3_SetWindowPosition(window, x, y);
if (!hidden) {
SDL3_ShowWindow(window);
}
}
-
return window;
}
@@ -4446,15 +4443,12 @@ SDL_CreateShapedWindow(const char *title, unsigned int x, unsigned int y, unsign
}
window = SDL3_CreateShapedWindow(title, (int)w, (int)h, flags);
- if (window) {
- if (setpos) {
- SDL3_SetWindowPosition(window, (int)x, (int)y);
- }
+ if (window && setpos) {
+ SDL3_SetWindowPosition(window, (int)x, (int)y);
if (!hidden) {
SDL3_ShowWindow(window);
}
}
-
return window;
}