--- a/src/video/null_v.cpp Wed Jun 13 12:05:56 2007 +0000
+++ b/src/video/null_v.cpp Tue Jun 19 07:21:01 2007 +0000
@@ -5,19 +5,21 @@
#include "../gfx.h"
#include "../variables.h"
#include "../window.h"
+#include "../debug.h"
+#include "../blitter/factory.hpp"
#include "null_v.h"
-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 = (Pixel *)malloc(_cur_resolution[0] * _cur_resolution[1] * sizeof(Pixel));
+ /* Do not render, nor blit */
+ DEBUG(misc, 1, "Forcing blitter 'null'...");
+ BlitterFactoryBase::SelectBlitter("null");
return NULL;
}
-static void NullVideoStop() { free(_null_video_mem); }
+static void NullVideoStop() { }
static void NullVideoMakeDirty(int left, int top, int width, int height) {}
@@ -27,7 +29,7 @@
for (i = 0; i < 1000; i++) {
GameLoop();
- _screen.dst_ptr = _null_video_mem;
+ _screen.dst_ptr = NULL;
UpdateWindows();
}
}