Print system SDL version on startup

This commit is contained in:
Daniel Gibson 2017-08-01 18:14:31 +02:00
parent 5e61c23fd8
commit 6d39da37ca

View file

@ -73,12 +73,18 @@ GLimp_Init(void)
Com_Printf("Couldn't init SDL video: %s.\n", SDL_GetError());
return false;
}
SDL_version version;
#if SDL_VERSION_ATLEAST(2, 0, 0)
SDL_GetVersion(&version);
const char* driverName = SDL_GetCurrentVideoDriver();
#else
char driverName[64];
SDL_VideoDriverName(driverName, sizeof(driverName));
version = *SDL_Linked_Version();
#endif
Com_Printf("SDL version is: %i.%i.%i\n", (int)version.major, (int)version.minor, (int)version.patch);
Com_Printf("SDL video driver is \"%s\".\n", driverName);
}