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 sdl2_default_v.h Default backend of the SDL2 video driver. */
10 #ifndef VIDEO_SDL2_DEFAULT_H
11 #define VIDEO_SDL2_DEFAULT_H
15 /** The SDL video driver using default SDL backend. */
16 class VideoDriver_SDL_Default
: public VideoDriver_SDL_Base
{
18 std::string_view
GetName() const override
{ return "sdl"; }
21 bool AllocateBackingStore(int w
, int h
, bool force
= false) override
;
22 void *GetVideoPointer() override
;
23 void Paint() override
;
25 void ReleaseVideoPointer() override
{}
32 /** Factory for the SDL video driver. */
33 class FVideoDriver_SDL_Default
: public DriverFactoryBase
{
35 FVideoDriver_SDL_Default() : DriverFactoryBase(Driver::DT_VIDEO
, 5, "sdl", "SDL Video Driver") {}
36 Driver
*CreateInstance() const override
{ return new VideoDriver_SDL_Default(); }
39 #endif /* VIDEO_SDL2_DEFAULT_H */