From 97ce33b5b83fc7fcbf91933e30fd684fc0b979e8 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 13 Feb 2025 10:30:15 -0800
Subject: [PATCH] Explain why the initial size isn't sent, for future us.
---
src/sdl2_compat.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index d6824de..1099129 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -2053,7 +2053,9 @@ EventFilter3to2(void *userdata, SDL_Event *event3)
SDL3_SetNumberProperty(props, PROP_WINDOW_EXPECTED_HEIGHT, event2.window.data2);
SDL3_SetFloatProperty(props, PROP_WINDOW_EXPECTED_SCALE, SDL3_GetWindowDisplayScale(window));
if (!expected_w || !expected_h) {
- /* Don't send the initial size, SDL2 didn't in this case */
+ /* Don't send the initial size, SDL2 didn't in this case.
+ * ffplay breaks if the initial size is sent, see https://github.com/libsdl-org/sdl2-compat/issues/268 for details.
+ */
break;
}