From cf45b309e48b2c3aa0ade40ab40b4ffb4311044f Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Fri, 2 Aug 2024 16:43:20 +0200 Subject: [PATCH] Add SDL info to version command output --- Quake/host.c | 16 ++++++++++++---- Quake/quakedef.h | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Quake/host.c b/Quake/host.c index e330dfee7..fe645d302 100644 --- a/Quake/host.c +++ b/Quake/host.c @@ -257,10 +257,18 @@ void Host_FindMaxClients (void) void Host_Version_f (void) { - Con_Printf ("Quake Version %1.2f\n", VERSION); - Con_Printf ("QuakeSpasm Version " QUAKESPASM_VER_STRING "\n"); - Con_Printf ("Ironwail Version " IRONWAIL_VER_STRING "\n"); - Con_Printf ("Exe: " __TIME__ " " __DATE__ " (%s %d-bit)\n", SDL_GetPlatform (), (int)sizeof(void*)*8); + SDL_version sdl_linked; + SDL_GetVersion (&sdl_linked); + + Con_Printf ("\n"); + Con_Printf ("Quake %1.2f\n", VERSION); + Con_Printf ("QuakeSpasm " QUAKESPASM_VER_STRING "\n"); + Con_Printf ("Ironwail " IRONWAIL_VER_STRING "\n"); + Con_Printf ("Exe " __TIME__ " " __DATE__ "\n"); + Con_Printf ("SDL " Q_SDL_COMPILED_VERSION_STRING " (compiled)\n"); + Con_Printf (" %d.%d.%d (linked)\n", sdl_linked.major, sdl_linked.minor, sdl_linked.patch); + Con_Printf ("OS %s %d-bit\n", SDL_GetPlatform (), (int)sizeof(void*)*8); + Con_Printf ("\n"); } /* cvar callback functions : */ diff --git a/Quake/quakedef.h b/Quake/quakedef.h index e93abcd34..d0def9b54 100644 --- a/Quake/quakedef.h +++ b/Quake/quakedef.h @@ -54,6 +54,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define QUAKESPASM_VER_STRING QS_STRINGIFY(QUAKESPASM_VERSION) "." QS_STRINGIFY(QUAKESPASM_VER_PATCH) QUAKESPASM_VER_SUFFIX #define IRONWAIL_VER_STRING QS_STRINGIFY(IRONWAIL_VER_MAJOR) "." QS_STRINGIFY(IRONWAIL_VER_MINOR) "." QS_STRINGIFY(IRONWAIL_VER_PATCH) IRONWAIL_VER_SUFFIX +// SDL version the code was compiled with +#define Q_SDL_COMPILED_VERSION_STRING QS_STRINGIFY(SDL_MAJOR_VERSION) "." QS_STRINGIFY(SDL_MINOR_VERSION) "." QS_STRINGIFY(SDL_PATCHLEVEL) + #define CONSOLE_TITLE_STRING "Ironwail " IRONWAIL_VER_STRING #define WINDOW_TITLE_STRING "Quake/Ironwail " IRONWAIL_VER_STRING #define CONFIG_NAME "ironwail.cfg"