OpenTTD Source: src/video/video_driver.hpp File Reference

OpenTTD Source 15.0-beta1

Data Structures | Variables
video_driver.hpp File Reference

Base of all video drivers. More...

`#include "../driver.h"`
`#include "../core/geometry_type.hpp"`
`#include "../core/math_func.hpp"`
`#include "../gfx_func.h"`
`#include "../settings_type.h"`
`#include "../zoom_type.h"`
`#include "../network/network_func.h"`
`#include <atomic>`
`#include <chrono>`
`#include <condition_variable>`
`#include <mutex>`
`#include <thread>`

Go to the source code of this file.

## Data Structures
class | VideoDriver
| The base of all video drivers. More...
struct | VideoDriver::VideoBufferLocker
| Helper struct to ensure the video buffer is locked and ready for drawing. More...

## Variables
std::string | _ini_videodriver
| The video driver a stored in the configuration file.
std::vector< Dimension > | _resolutions
| List of resolutions.
Dimension | _cur_resolution
| The current resolution.
bool | _rightclick_emulate
| Whether right clicking is emulated.
bool | _video_hw_accel
| Whether to consider hardware accelerated video drivers on startup.
bool | _video_vsync
| Whether we should use vsync (only if active video driver supports HW acceleration).

## Detailed Description

Base of all video drivers.

Definition in file video_driver.hpp.

## Variable Documentation

## ◆ _cur_resolution

Dimension _cur_resolution
| extern

The current resolution.

Definition at line 26 of file driver.cpp.

Referenced by GameSizeChanged(), openttd_main(), VideoDriver_Dedicated::Start(), VideoDriver_Null::Start(), VideoDriver_SDL_Base::Start(), VideoDriver_SDL::Start(), VideoDriver_Win32GDI::Start(), VideoDriver_SDL::ToggleFullscreen(), and VideoDriver::UpdateAutoResolution().

## ◆ _ini_videodriver

std::string _ini_videodriver
| extern

The video driver a stored in the configuration file.

Definition at line 24 of file driver.cpp.

Referenced by openttd_main().

## ◆ _resolutions

std::vector<Dimension> _resolutions
| extern

List of resolutions.

Definition at line 25 of file driver.cpp.

Referenced by GameOptionsWindow::BuildDropDownList(), GetCurrentResolutionIndex(), GameOptionsWindow::OnDropdownSelect(), GameOptionsWindow::SetStringParameters(), and VideoDriver_SDL::ToggleFullscreen().

## ◆ _rightclick_emulate

bool _rightclick_emulate
| extern

Whether right clicking is emulated.

Definition at line 27 of file driver.cpp.

Referenced by VideoDriver_SDL_Base::PollEvent(), and VideoDriver_SDL::PollEvent().

## ◆ _video_hw_accel

bool _video_hw_accel
| extern

Whether to consider hardware accelerated video drivers on startup.

Definition at line 25 of file video_driver.cpp.

Referenced by GameOptionsWindow::OnClick(), GameOptionsWindow::OnInvalidateData(), and DriverFactoryBase::SelectDriverImpl().

## ◆ _video_vsync

bool _video_vsync
| extern

Whether we should use vsync (only if active video driver supports HW acceleration).

Definition at line 26 of file video_driver.cpp.

Referenced by GameOptionsWindow::OnClick(), and GameOptionsWindow::OnInvalidateData().