2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
8 /** @file null_v.h Base of the video driver that doesn't blit. */
13 #include "video_driver.hpp"
15 /** The null video driver. */
16 class VideoDriver_Null
: public VideoDriver
{
18 uint ticks
; ///< Amount of ticks to run.
21 const char *Start(const StringList
¶m
) override
;
25 void MakeDirty(int left
, int top
, int width
, int height
) override
;
27 void MainLoop() override
;
29 bool ChangeResolution(int w
, int h
) override
;
31 bool ToggleFullscreen(bool fullscreen
) override
;
32 const char *GetName() const override
{ return "null"; }
33 bool HasGUI() const override
{ return false; }
36 /** Factory the null video driver. */
37 class FVideoDriver_Null
: public DriverFactoryBase
{
39 FVideoDriver_Null() : DriverFactoryBase(Driver::DT_VIDEO
, 0, "null", "Null Video Driver") {}
40 Driver
*CreateInstance() const override
{ return new VideoDriver_Null(); }
43 #endif /* VIDEO_NULL_H */