src/video/null_v.cpp
branchgamebalance
changeset 9911 0b8b245a2391
parent 9895 7bd07f43b0e3
child 6720 35756db7e577
child 7374 54c06f06ecc8
child 9628 b5c2449616b5
--- a/src/video/null_v.cpp	Wed Jun 13 11:17:30 2007 +0000
+++ b/src/video/null_v.cpp	Wed Jun 13 11:45:14 2007 +0000
@@ -7,13 +7,13 @@
 #include "../window.h"
 #include "null_v.h"
 
-static void* _null_video_mem = NULL;
+static Pixel *_null_video_mem = NULL;
 
 static const char* NullVideoStart(const char* const* parm)
 {
 	_screen.width = _screen.pitch = _cur_resolution[0];
 	_screen.height = _cur_resolution[1];
-	_null_video_mem = malloc(_cur_resolution[0] * _cur_resolution[1]);
+	_null_video_mem = (Pixel *)malloc(_cur_resolution[0] * _cur_resolution[1] * sizeof(Pixel));
 	return NULL;
 }
 
@@ -27,7 +27,7 @@
 
 	for (i = 0; i < 1000; i++) {
 		GameLoop();
-		_screen.dst_ptr = (Pixel*)_null_video_mem;
+		_screen.dst_ptr = _null_video_mem;
 		UpdateWindows();
 	}
 }