--- a/hedgewars/uMisc.pas Thu Sep 15 03:17:23 2011 +0200
+++ b/hedgewars/uMisc.pas Thu Sep 15 09:19:56 2011 +0200
@@ -32,7 +32,7 @@
procedure freeModule;
implementation
-uses typinfo, sysutils, uVariables;
+uses typinfo, sysutils, uVariables, uUtils;
procedure movecursor(dx, dy: LongInt);
var x, y: LongInt;
@@ -74,7 +74,7 @@
ScreenFadeValue:= sfMax;
ScreenFadeSpeed:= 5;
-size:= cScreenWidth * cScreenHeight * 3;
+size:= toPowerOf2(cScreenWidth) * toPowerOf2(cScreenHeight) * 3;
p:= GetMem(size);
// memory could not be allocated