oops. forgot the free. also drop the speed check.
authornemo
Tue, 23 Feb 2010 03:57:27 +0000
changeset 2851 a9a5ce1d9f23
parent 2850 f6f8db825ce7
child 2852 c6dff591f564
oops. forgot the free. also drop the speed check.
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Tue Feb 23 03:55:46 2010 +0000
+++ b/hedgewars/uWorld.pas	Tue Feb 23 03:57:27 2010 +0000
@@ -653,7 +653,7 @@
 inc(Frames);
 
 if cShowFPS or (GameType = gmtDemo) then inc(CountTicks, Lag);
-if (GameType = gmtDemo) and (not isSpeed) and (CountTicks >= 1000) then
+if (GameType = gmtDemo) and (CountTicks >= 1000) then
    begin
    i:=GameTicks div 60000;
    t:=(GameTicks-(i*60000)) div 1000;
@@ -662,6 +662,7 @@
    s:= s+inttostr(i)+':';
    if t<10 then s:=s+'0';
    s:= s+inttostr(t);
+   if timeTexture <> nil then FreeTexture(timeTexture);
    tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(s), cWhiteColorChannels);
    tmpSurface:= doSurfaceConversion(tmpSurface);
    timeTexture:= Surface2Tex(tmpSurface, false);