diff --git a/source/src/audiomanager.cpp b/source/src/audiomanager.cpp index 55514884..fba18440 100644 --- a/source/src/audiomanager.cpp +++ b/source/src/audiomanager.cpp @@ -42,7 +42,7 @@ void audiomanager::initsound() copystring(d, "Audio devices: "); // null separated device string - for(const ALchar *c = devices; c[strlen(c)+1]; c += strlen(c)+1) + for(const ALchar *c = devices; *c; c += strlen(c)+1) { if(c!=devices) concatstring(d, ", "); concatstring(d, c); diff --git a/source/src/main.cpp b/source/src/main.cpp index 640e9463..d8185b8b 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -1089,25 +1089,31 @@ int main(int argc, char **argv) initing = NOT_INITING; - initlog("sdl"); + #define STRINGIFY_(x) #x + #define STRINGIFY(x) STRINGIFY_(x) + #define SDLVERSIONSTRING STRINGIFY(SDL_MAJOR_VERSION) "." STRINGIFY(SDL_MINOR_VERSION) "." STRINGIFY(SDL_PATCHLEVEL) + initlog("sdl (" SDLVERSIONSTRING ")"); int par = 0; #ifdef _DEBUG par = SDL_INIT_NOPARACHUTE; #endif if(SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO|par)<0) fatal("Unable to initialize SDL"); + const SDL_version *sdlver = SDL_Linked_Version(); + if(SDL_COMPILEDVERSION != SDL_VERSIONNUM(sdlver->major, sdlver->minor, sdlver->patch)) + clientlogf("SDL: compiled version " SDLVERSIONSTRING ", linked version %u.%u.%u", sdlver->major, sdlver->minor, sdlver->patch); #if 0 if(highprocesspriority) setprocesspriority(true); #endif - if (!dedicated) initlog("net"); + if (!dedicated) initlog("net (" STRINGIFY(ENET_VERSION_MAJOR) "." STRINGIFY(ENET_VERSION_MINOR) "." STRINGIFY(ENET_VERSION_PATCH) ")"); if(enet_initialize()<0) fatal("Unable to initialise network module"); if (!dedicated) initclient(); //FIXME the server executed in this way does not catch the SIGTERM or ^C initserver(dedicated,argc,argv); // never returns if dedicated - initlog("world"); + initlog("world (" STRINGIFY(AC_VERSION) ")"); empty_world(7, true); initlog("video: sdl");