浏览代码

gdk: show dialog when xgameruntime.dll is not installed

Anonymous Maarten 1 年之前
父节点
当前提交
e631fdfbd2
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/main/gdk/SDL_sysmain_runapp.cpp

+ 5 - 1
src/main/gdk/SDL_sysmain_runapp.cpp

@@ -126,7 +126,11 @@ int SDL_RunApp(int, char**, SDL_main_func mainFunction, void *reserved)
         XGameRuntimeUninitialize();
         XGameRuntimeUninitialize();
     } else {
     } else {
 #ifdef SDL_PLATFORM_WINGDK
 #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
 #else
         SDL_assert_always(0 && "[GDK] Could not initialize - aborting");
         SDL_assert_always(0 && "[GDK] Could not initialize - aborting");
 #endif
 #endif