[Scummvm-git-logs] scummvm master -> 6fcfdaa1b4e68e54d9ad1ef358cff7fa7a5fa89e

sev- noreply at scummvm.org
Mon Mar 20 17:55:35 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6fcfdaa1b4 BASE: SDL: Show SDL version in --version output


Commit: 6fcfdaa1b4e68e54d9ad1ef358cff7fa7a5fa89e
    https://github.com/scummvm/scummvm/commit/6fcfdaa1b4e68e54d9ad1ef358cff7fa7a5fa89e
Author: Lothar Serra Mari (mail at serra.me)
Date: 2023-03-20T18:55:30+01:00

Commit Message:
BASE: SDL: Show SDL version in --version output

Changed paths:
    base/commandLine.cpp


diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 73b442ccb1c..676cc85bfa1 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -61,6 +61,10 @@ static const char USAGE_STRING[] =
 	"Try '%s --help' for more options.\n"
 ;
 
+#ifdef SDL_BACKEND
+#include "backends/platform/sdl/sdl-sys.h"
+#endif
+
 // DONT FIXME: DO NOT ORDER ALPHABETICALLY, THIS IS ORDERED BY IMPORTANCE/CATEGORY! :)
 static const char HELP_STRING1[] =
 	"ScummVM - Graphical Adventure Game Interpreter\n"
@@ -1766,6 +1770,15 @@ bool processSettings(Common::String &command, Common::StringMap &settings, Commo
 		return true;
 	} else if (command == "version") {
 		printf("%s\n", gScummVMFullVersion);
+#ifdef SDL_BACKEND
+#ifdef USE_SDL2
+		SDL_version sdlLinkedVersion;
+		SDL_GetVersion(&sdlLinkedVersion);
+		printf("Using SDL backend with SDL %d.%d.%d\n", sdlLinkedVersion.major, sdlLinkedVersion.minor, sdlLinkedVersion.patch);
+#else
+		printf("Using SDL backend with SDL %d.%d.%d\n", SDL_Linked_Version()->major, SDL_Linked_Version()->minor, SDL_Linked_Version()->patch);
+#endif
+#endif
 		printf("Features compiled in: %s\n", gScummVMFeatures);
 		return true;
 	} else if (command == "help") {




More information about the Scummvm-git-logs mailing list