hedgewars/uMisc.pas
changeset 5911 4a28d0ae9624
parent 5910 c9a4de51b5a0
child 5912 d31eba29e706
--- 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