Changeset - r7243:2e3ac800c6ea
[Not reviewed]
master
0 1 0
truelight - 17 years ago 2007-07-13 10:46:07
truelight@openttd.org
(svn r10537) -Backport r10536: added option for null-driver to configure how long it should run (-vnull:ticks=10000)
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/video/null_v.cpp
Show inline comments
 
@@ -7,15 +7,17 @@
 
#include "../window.h"
 
#include "../debug.h"
 
#include "../blitter/factory.hpp"
 
#include "null_v.h"
 

	
 
static FVideoDriver_Null iFVideoDriver_Null;
 
static uint _null_ticks = 0;
 

	
 
const char *VideoDriver_Null::Start(const char* const *parm)
 
{
 
	_null_ticks = GetDriverParamInt(parm, "ticks", 1000);
 
	_screen.width = _screen.pitch = _cur_resolution[0];
 
	_screen.height = _cur_resolution[1];
 
	/* Do not render, nor blit */
 
	DEBUG(misc, 1, "Forcing blitter 'null'...");
 
	BlitterFactoryBase::SelectBlitter("null");
 
	return NULL;
 
@@ -26,13 +28,13 @@ void VideoDriver_Null::Stop() { }
 
void VideoDriver_Null::MakeDirty(int left, int top, int width, int height) {}
 

	
 
void VideoDriver_Null::MainLoop()
 
{
 
	uint i;
 

	
 
	for (i = 0; i < 1000; i++) {
 
	for (i = 0; i < _null_ticks; i++) {
 
		GameLoop();
 
		_screen.dst_ptr = NULL;
 
		UpdateWindows();
 
	}
 
}
 

	
0 comments (0 inline, 0 general)