diff options
author | truelight <truelight@openttd.org> | 2007-07-13 10:46:07 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-07-13 10:46:07 +0000 |
commit | 56dfe3031c1748933c422b4ccbe0a3954ea726b7 (patch) | |
tree | c07b6a767864ae6ca17773c447d9a8210cc42fa5 | |
parent | 86e2e2f1c3ef73c9fc0362649834c70d20bee090 (diff) | |
download | openttd-56dfe3031c1748933c422b4ccbe0a3954ea726b7.tar.xz |
(svn r10537) -Backport r10536: added option for null-driver to configure how long it should run (-vnull:ticks=10000)
-rw-r--r-- | src/video/null_v.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video/null_v.cpp b/src/video/null_v.cpp index 0a01eb6f9..6a0abc6b1 100644 --- a/src/video/null_v.cpp +++ b/src/video/null_v.cpp @@ -10,9 +10,11 @@ #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 */ @@ -29,7 +31,7 @@ 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(); |