OpenTTD Source 20241224-master-gee860a5c8e
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

◆ _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

◆ _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().