src/video/dedicated_v.cpp
branchnoai
changeset 9624 b71483f2330f
parent 6591 d0d51ffb0447
child 6720 35756db7e577
child 7374 54c06f06ecc8
child 9628 b5c2449616b5
--- a/src/video/dedicated_v.cpp	Fri May 11 15:13:08 2007 +0000
+++ b/src/video/dedicated_v.cpp	Fri May 25 00:25:08 2007 +0000
@@ -112,7 +112,7 @@
 #endif
 
 
-static void *_dedicated_video_mem;
+static Pixel *_dedicated_video_mem;
 
 extern bool SafeSaveOrLoad(const char *filename, int mode, int newgm);
 extern void SwitchMode(int new_mode);
@@ -122,7 +122,7 @@
 {
 	_screen.width = _screen.pitch = _cur_resolution[0];
 	_screen.height = _cur_resolution[1];
-	_dedicated_video_mem = malloc(_cur_resolution[0]*_cur_resolution[1]);
+	_dedicated_video_mem = (Pixel *)malloc(_cur_resolution[0] * _cur_resolution[1] * sizeof(Pixel));
 
 	SetDebugString("net=6");
 
@@ -283,7 +283,7 @@
 			next_tick = cur_ticks + 30;
 
 			GameLoop();
-			_screen.dst_ptr = (Pixel*)_dedicated_video_mem;
+			_screen.dst_ptr = _dedicated_video_mem;
 			UpdateWindows();
 		}
 		CSleep(1);