1 /* $Id: null_v.cpp 26209 2014-01-02 22:41:58Z rubidium $ */
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
10 /** @file null_v.cpp The videio driver that doesn't blit. */
12 #include "../stdafx.h"
13 #include "../gfx_func.h"
14 #include "../blitter/factory.hpp"
17 #include "../safeguards.h"
19 /** Factory for the null video driver. */
20 static FVideoDriver_Null iFVideoDriver_Null
;
22 const char *VideoDriver_Null::Start(const char * const *parm
)
25 /* Disable the MSVC assertion message box. */
26 _set_error_mode(_OUT_TO_STDERR
);
29 this->ticks
= GetDriverParamInt(parm
, "ticks", 1000);
30 _screen
.width
= _screen
.pitch
= _cur_resolution
.width
;
31 _screen
.height
= _cur_resolution
.height
;
32 _screen
.dst_ptr
= nullptr;
35 /* Do not render, nor blit */
36 DEBUG(misc
, 1, "Forcing blitter 'null'...");
37 BlitterFactory::SelectBlitter("null");
41 void VideoDriver_Null::Stop() { }
43 void VideoDriver_Null::MakeDirty(int left
, int top
, int width
, int height
) {}
45 void VideoDriver_Null::MainLoop()
49 for (i
= 0; i
< this->ticks
; i
++) {
55 bool VideoDriver_Null::ChangeResolution(int w
, int h
) { return false; }
57 bool VideoDriver_Null::ToggleFullscreen(bool fs
) { return false; }