SDL: wayland: Print an error when the display connection is closed by the server

From 0bda7e22cf885cba1d1c737d86aea7badaf60213 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Thu, 18 Apr 2024 11:20:50 -0400
Subject: [PATCH] wayland: Print an error when the display connection is closed
 by the server

Otherwise, it isn't immediately clear to the client application as to why its windows suddenly disappeared, and it received a quit event out of nowhere.
---
 src/video/wayland/SDL_waylandevents.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c
index fc9788643554e..d8badd2aae9ca 100644
--- a/src/video/wayland/SDL_waylandevents.c
+++ b/src/video/wayland/SDL_waylandevents.c
@@ -498,6 +498,7 @@ void Wayland_PumpEvents(SDL_VideoDevice *_this)
          */
         if (!Wayland_VideoReconnect(_this)) {
             d->display_disconnected = 1;
+            SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Wayland display connection closed by server (fatal)");
 
             /* Only send a single quit message, as application shutdown might call
              * SDL_PumpEvents