QTfrontend/ui/widget/about.cpp
changeset 12392 cfcbc960337e
parent 12320 0f98d45204d7
child 12902 fc47fc4af6bd
equal deleted inserted replaced
12391:e4f8bf43224d 12392:cfcbc960337e
   123         .arg(sdlmixer_ver->patch));
   123         .arg(sdlmixer_ver->patch));
   124     libinfo.append(QString("<br>"));
   124     libinfo.append(QString("<br>"));
   125 
   125 
   126     // the remaining sdl modules used only in engine, so instead of needlessly linking them here
   126     // the remaining sdl modules used only in engine, so instead of needlessly linking them here
   127     // we dynamically call the function returning the linked version
   127     // we dynamically call the function returning the linked version
   128     void *sdlnet_handle = SDL_LoadObject(sopath("SDL_net"));
   128     void *sdlnet_handle = SDL_LoadObject(sopath("SDL2_net"));
   129     if (sdlnet_handle != NULL) {
   129     if (sdlnet_handle != NULL) {
   130         SDL_version *(*sdlnet_ver_get)(void) = NULL;
   130         SDL_version *(*sdlnet_ver_get)(void) = NULL;
   131         sdlnet_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlnet_handle, "SDLNet_Linked_Version");
   131         sdlnet_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlnet_handle, "SDLNet_Linked_Version");
   132         if (sdlnet_ver_get != NULL) {
   132         if (sdlnet_ver_get != NULL) {
   133             SDL_version *sdlnet_ver = sdlnet_ver_get();
   133             SDL_version *sdlnet_ver = sdlnet_ver_get();
   134             libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL_net</a>: %1.%2.%3"))
   134             libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL2_net</a>: %1.%2.%3"))
   135                 .arg(sdlnet_ver->major)
   135                 .arg(sdlnet_ver->major)
   136                 .arg(sdlnet_ver->minor)
   136                 .arg(sdlnet_ver->minor)
   137                 .arg(sdlnet_ver->patch));
   137                 .arg(sdlnet_ver->patch));
   138             libinfo.append(QString("<br>"));
   138             libinfo.append(QString("<br>"));
   139         }
   139         }
   140         SDL_UnloadObject(sdlnet_handle);
   140         SDL_UnloadObject(sdlnet_handle);
   141     }
   141     }
   142 
   142 
   143     void *sdlimage_handle = SDL_LoadObject(sopath("SDL_image"));
   143     void *sdlimage_handle = SDL_LoadObject(sopath("SDL2_image"));
   144     if (sdlimage_handle != NULL) {
   144     if (sdlimage_handle != NULL) {
   145         SDL_version *(*sdlimage_ver_get)(void) = NULL;
   145         SDL_version *(*sdlimage_ver_get)(void) = NULL;
   146         sdlimage_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlimage_handle, "IMG_Linked_Version");
   146         sdlimage_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlimage_handle, "IMG_Linked_Version");
   147         if (sdlimage_ver_get != NULL) {
   147         if (sdlimage_ver_get != NULL) {
   148             SDL_version *sdlimage_ver = sdlimage_ver_get();
   148             SDL_version *sdlimage_ver = sdlimage_ver_get();
   149             libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL_image</a>: %1.%2.%3"))
   149             libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL2_image</a>: %1.%2.%3"))
   150                 .arg(sdlimage_ver->major)
   150                 .arg(sdlimage_ver->major)
   151                 .arg(sdlimage_ver->minor)
   151                 .arg(sdlimage_ver->minor)
   152                 .arg(sdlimage_ver->patch));
   152                 .arg(sdlimage_ver->patch));
   153             libinfo.append(QString("<br>"));
   153             libinfo.append(QString("<br>"));
   154         }
   154         }
   155         SDL_UnloadObject(sdlimage_handle);
   155         SDL_UnloadObject(sdlimage_handle);
   156     }
   156     }
   157 
   157 
   158     void *sdlttf_handle = SDL_LoadObject(sopath("SDL_ttf"));
   158     void *sdlttf_handle = SDL_LoadObject(sopath("SDL2_ttf"));
   159     if (sdlttf_handle != NULL) {
   159     if (sdlttf_handle != NULL) {
   160         SDL_version *(*sdlttf_ver_get)(void) = NULL;
   160         SDL_version *(*sdlttf_ver_get)(void) = NULL;
   161         sdlttf_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlttf_handle, "TTF_Linked_Version");
   161         sdlttf_ver_get = (SDL_version *(*)(void)) SDL_LoadFunction(sdlttf_handle, "TTF_Linked_Version");
   162         if (sdlttf_ver_get != NULL) {
   162         if (sdlttf_ver_get != NULL) {
   163             SDL_version *sdlttf_ver = sdlttf_ver_get();
   163             SDL_version *sdlttf_ver = sdlttf_ver_get();
   164             libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL_ttf</a>: %1.%2.%3"))
   164             libinfo.append(QString(tr("<a href=\"https://www.libsdl.org/\">SDL2_ttf</a>: %1.%2.%3"))
   165                 .arg(sdlttf_ver->major)
   165                 .arg(sdlttf_ver->major)
   166                 .arg(sdlttf_ver->minor)
   166                 .arg(sdlttf_ver->minor)
   167                 .arg(sdlttf_ver->patch));
   167                 .arg(sdlttf_ver->patch));
   168             libinfo.append(QString("<br>"));
   168             libinfo.append(QString("<br>"));
   169         }
   169         }