mirror of https://github.com/OpenTTD/OpenTTD
(svn r10537) -Backport r10536: added option for null-driver to configure how long it should run (-vnull:ticks=10000)
parent
1e08060929
commit
3d684e3477
|
@ -10,9 +10,11 @@
|
||||||
#include "null_v.h"
|
#include "null_v.h"
|
||||||
|
|
||||||
static FVideoDriver_Null iFVideoDriver_Null;
|
static FVideoDriver_Null iFVideoDriver_Null;
|
||||||
|
static uint _null_ticks = 0;
|
||||||
|
|
||||||
const char *VideoDriver_Null::Start(const char* const *parm)
|
const char *VideoDriver_Null::Start(const char* const *parm)
|
||||||
{
|
{
|
||||||
|
_null_ticks = GetDriverParamInt(parm, "ticks", 1000);
|
||||||
_screen.width = _screen.pitch = _cur_resolution[0];
|
_screen.width = _screen.pitch = _cur_resolution[0];
|
||||||
_screen.height = _cur_resolution[1];
|
_screen.height = _cur_resolution[1];
|
||||||
/* Do not render, nor blit */
|
/* Do not render, nor blit */
|
||||||
|
@ -29,7 +31,7 @@ void VideoDriver_Null::MainLoop()
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
for (i = 0; i < 1000; i++) {
|
for (i = 0; i < _null_ticks; i++) {
|
||||||
GameLoop();
|
GameLoop();
|
||||||
_screen.dst_ptr = NULL;
|
_screen.dst_ptr = NULL;
|
||||||
UpdateWindows();
|
UpdateWindows();
|
||||||
|
|
Loading…
Reference in New Issue