From: bones_was_here Date: Mon, 30 Oct 2023 00:00:34 +0000 (+1000) Subject: SDL: print version earlier, once only X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=03f5a13352c3f396291f80094c0547db60438bb3;p=xonotic%2Fdarkplaces.git SDL: print version earlier, once only No need to print it again at every vid_restart, it can't change. Signed-off-by: bones_was_here --- diff --git a/vid_sdl.c b/vid_sdl.c index 7b2eb27d..710b430b 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -1480,6 +1480,8 @@ static void VID_SetVsync_c(cvar_t *var) void VID_Init (void) { + SDL_version version; + #ifndef __IPHONEOS__ #ifdef MACOSX Cvar_RegisterVariable(&apple_mouse_noaccel); @@ -1511,6 +1513,12 @@ void VID_Init (void) Sys_Error ("Failed to init SDL video subsystem: %s", SDL_GetError()); if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0) Con_Printf(CON_ERROR "Failed to init SDL joystick subsystem: %s\n", SDL_GetError()); + + SDL_GetVersion(&version); + Con_Printf("Linked against SDL version %d.%d.%d\n" + "Using SDL library version %d.%d.%d\n", + SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL, + version.major, version.minor, version.patch); } static int vid_sdljoystickindex = -1; @@ -1576,16 +1584,6 @@ void VID_EnableJoystick(qbool enable) Cvar_SetValueQuick(&joy_active, success ? 1 : 0); } -static void VID_OutputVersion(void) -{ - SDL_version version; - SDL_GetVersion(&version); - Con_Printf( "Linked against SDL version %d.%d.%d\n" - "Using SDL library version %d.%d.%d\n", - SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL, - version.major, version.minor, version.patch ); -} - #ifdef WIN32 static void AdjustWindowBounds(viddef_mode_t *mode, RECT *rect) { @@ -1655,8 +1653,6 @@ static qbool VID_InitModeGL(viddef_mode_t *mode) if(vid_resizable.integer) windowflags |= SDL_WINDOW_RESIZABLE; - VID_OutputVersion(); - #ifndef USE_GLES2 // COMMANDLINEOPTION: SDL GL: -gl_driver selects a GL driver library, default is whatever SDL recommends, useful only for 3dfxogl.dll/3dfxvgl.dll or fxmesa or similar, if you don't know what this is for, you don't need it i = Sys_CheckParm("-gl_driver");