SDL: gdk: show dialog when xgameruntime.dll is not installed

From e631fdfbd2ed2f832586ef5c047023aa9ab14a95 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Mon, 5 Aug 2024 02:28:42 +0200
Subject: [PATCH] gdk: show dialog when xgameruntime.dll is not installed

---
 src/main/gdk/SDL_sysmain_runapp.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/main/gdk/SDL_sysmain_runapp.cpp b/src/main/gdk/SDL_sysmain_runapp.cpp
index 35de9e192dec1..911293ec25813 100644
--- a/src/main/gdk/SDL_sysmain_runapp.cpp
+++ b/src/main/gdk/SDL_sysmain_runapp.cpp
@@ -126,7 +126,11 @@ int SDL_RunApp(int, char**, SDL_main_func mainFunction, void *reserved)
         XGameRuntimeUninitialize();
     } else {
 #ifdef SDL_PLATFORM_WINGDK
-        SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Fatal Error", "[GDK] Could not initialize - aborting", NULL);
+        if (hr == E_GAMERUNTIME_DLL_NOT_FOUND) {
+            SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Fatal Error", "[GDK] Gaming Runtime library not found (xgameruntime.dll)", NULL);
+        } else {
+            SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Fatal Error", "[GDK] Could not initialize - aborting", NULL);
+        }
 #else
         SDL_assert_always(0 && "[GDK] Could not initialize - aborting");
 #endif