# HG changeset patch # User Xeli # Date 1352994406 -3600 # Node ID a3b86c1f63b4cf6b37a0576e8ccb5b9a4a883959 # Parent 89740f9272542ae9f3c787b60ca71c0d0afda999 another tweak tomake --stats-only work on headless servers diff -r 89740f927254 -r a3b86c1f63b4 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Thu Nov 15 13:58:49 2012 +0400 +++ b/hedgewars/hwengine.pas Thu Nov 15 16:46:46 2012 +0100 @@ -108,7 +108,7 @@ exit(false); end; - SwapBuffers; + if not cOnlyStats then SwapBuffers; {$IFDEF USE_VIDEO_RECORDING} if flagPrerecording then @@ -354,7 +354,7 @@ Pathz[p]:= PathPrefix + '/' + Pathz[p]; WriteToConsole('Init SDL... '); - SDLTry(SDL_Init(SDL_INIT_VIDEO or SDL_INIT_NOPARACHUTE) >= 0, true); + if not cOnlyStats then SDLTry(SDL_Init(SDL_INIT_VIDEO or SDL_INIT_NOPARACHUTE) >= 0, true); WriteLnToConsole(msgOK); SDL_EnableUNICODE(1); diff -r 89740f927254 -r a3b86c1f63b4 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Thu Nov 15 13:58:49 2012 +0400 +++ b/hedgewars/uStore.pas Thu Nov 15 16:46:46 2012 +0100 @@ -576,7 +576,7 @@ if ((imageFlags and ifIgnoreCaps) = 0) and ((tmpsurf^.w > MaxTextureSize) or (tmpsurf^.h > MaxTextureSize)) then begin SDL_FreeSurface(tmpsurf); - OutError(msgFailedSize, (imageFlags and ifCritical) <> 0); + OutError(msgFailedSize, ((not cOnlyStats) and ((imageFlags and ifCritical) <> 0))); // dummy surface to replace non-critical textures that failed to load due to their size LoadImage:= SDL_CreateRGBSurface(SDL_SWSURFACE, 2, 2, 32, RMask, GMask, BMask, AMask); exit;