From bbd8542c70577c08ded30f1804566ce36b81abc8 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 4 May 2023 20:56:24 +0300
Subject: [PATCH] added missing SDL_Window* casts to SDL3_GetWindowData().
---
src/sdl2_compat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index d2a3536..a47c136 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -4770,7 +4770,7 @@ SDL_SetWindowPosition(SDL_Window *window, int x, int y)
{
/* Popup windows need to be transformed from global to relative coordinates. */
if (SDL3_GetWindowFlags(window) & (SDL_WINDOW_TOOLTIP | SDL_WINDOW_POPUP_MENU)) {
- SDL_Window *parent = SDL3_GetWindowData(window, POPUP_PARENT_PROP_STR);
+ SDL_Window *parent = (SDL_Window *) SDL3_GetWindowData(window, POPUP_PARENT_PROP_STR);
while (parent) {
int x_off, y_off;
@@ -4779,7 +4779,7 @@ SDL_SetWindowPosition(SDL_Window *window, int x, int y)
x -= x_off;
y -= y_off;
- parent = SDL3_GetWindowData(parent, POPUP_PARENT_PROP_STR);
+ parent = (SDL_Window *) SDL3_GetWindowData(parent, POPUP_PARENT_PROP_STR);
}
}
@@ -4793,7 +4793,7 @@ SDL_GetWindowPosition(SDL_Window *window, int *x, int *y)
/* Popup windows need to be transformed from relative to global coordinates. */
if (SDL3_GetWindowFlags(window) & (SDL_WINDOW_TOOLTIP | SDL_WINDOW_POPUP_MENU)) {
- SDL_Window *parent = SDL3_GetWindowData(window, POPUP_PARENT_PROP_STR);
+ SDL_Window *parent = (SDL_Window *) SDL3_GetWindowData(window, POPUP_PARENT_PROP_STR);
while (parent) {
int x_off, y_off;
@@ -4802,7 +4802,7 @@ SDL_GetWindowPosition(SDL_Window *window, int *x, int *y)
*x += x_off;
*y += y_off;
- parent = SDL3_GetWindowData(parent, POPUP_PARENT_PROP_STR);
+ parent = (SDL_Window *) SDL3_GetWindowData(parent, POPUP_PARENT_PROP_STR);
}
}
}