From 06b3c3636a0e2ec124d0400e1caf5f6b93a25a63 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 29 Jun 2019 15:43:45 -0700 Subject: [PATCH] Print compile-time and run-time SDL versions --- app/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index 51444b6b..af1daa9a 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -309,6 +309,18 @@ int main(int argc, char *argv[]) // Register custom metatypes for use in signals qRegisterMetaType("NvApp"); + SDL_version compileVersion; + SDL_VERSION(&compileVersion); + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, + "Compiled with SDL %d.%d.%d", + compileVersion.major, compileVersion.minor, compileVersion.patch); + + SDL_version runtimeVersion; + SDL_GetVersion(&runtimeVersion); + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, + "Running with SDL %d.%d.%d", + runtimeVersion.major, runtimeVersion.minor, compileVersion.patch); + // Allow the display to sleep by default. We will manually use SDL_DisableScreenSaver() // and SDL_EnableScreenSaver() when appropriate. This hint must be set before // initializing the SDL video subsystem to have any effect.