# HG changeset patch
# User koda
# Date 1373240080 -7200
# Node ID 02caf698a8f1f25528154f087a5d6631f9d2fb8a
# Parent 2d686849eeadb5863c8d8bf14140ed0b4c9dce85
dynamically load sdl_net information so we don't have to link it
diff -r 2d686849eead -r 02caf698a8f1 QTfrontend/ui/widget/about.cpp
--- a/QTfrontend/ui/widget/about.cpp Mon Jul 08 00:55:37 2013 +0200
+++ b/QTfrontend/ui/widget/about.cpp Mon Jul 08 01:34:40 2013 +0200
@@ -39,6 +39,15 @@
}
#endif
+
+#if defined(Q_OS_WINDOWS)
+#define sopath(x) x ".dll"
+#elif defined(Q_OS_MAC)
+#define sopath(x) "@executable_path/../Frameworks/" x ".framework/" x
+#else
+#define sopath(x) x //TODO
+#endif
+
#include "about.h"
About::About(QWidget * parent) :
@@ -100,6 +109,20 @@
.arg(MIX_MINOR_VERSION)
.arg(MIX_PATCHLEVEL));
+ void *sdlnet_handle = SDL_LoadObject(sopath("SDL_net"));
+ if (sdlnet_handle != NULL) {
+ SDL_version *(*sdlnet_ver_get)(void) = NULL;
+ sdlnet_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlnet_handle, "SDLNet_Linked_Version");
+ if (sdlnet_ver_get != NULL) {
+ SDL_version *sdlnet_ver = sdlnet_ver_get();
+ libinfo.append(QString("SDL_net version: %1.%2.%3
")
+ .arg(sdlnet_ver->major)
+ .arg(sdlnet_ver->minor)
+ .arg(sdlnet_ver->patch));
+ }
+ SDL_UnloadObject(sdlnet_handle);
+ }
+
libinfo.append(QString("Qt version: %1
").arg(QT_VERSION_STR));
#ifdef VIDEOREC