diff -r 0a4c88935902 -r 35d762458d66 hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Thu May 10 23:21:56 2012 +0200 +++ b/hedgewars/uMisc.pas Fri May 11 00:05:47 2012 +0200 @@ -49,6 +49,8 @@ size: QWord; end; +var conversionFormat: PSDL_PixelFormat; + procedure movecursor(dx, dy: LongInt); var x, y: LongInt; begin @@ -242,11 +244,11 @@ doSurfaceConversion:= tmpsurf; if ((tmpsurf^.format^.bitsperpixel = 32) and (tmpsurf^.format^.rshift > tmpsurf^.format^.bshift)) or (tmpsurf^.format^.bitsperpixel = 24) then - begin + begin convertedSurf:= SDL_ConvertSurface(tmpsurf, conversionFormat, SDL_SWSURFACE); SDL_FreeSurface(tmpsurf); doSurfaceConversion:= convertedSurf; - end; + end; end; {$IFDEF SDL13}