OpenTTD Source: VideoDriver::VideoBufferLocker Struct Reference

OpenTTD Source 15.0-RC2

Private Attributes
VideoDriver::VideoBufferLocker Struct Reference

Helper struct to ensure the video buffer is locked and ready for drawing. More...

`#include <video_driver.hpp>`

## Private Attributes
bool | unlock
| Stores if the lock did anything that has to be undone.

## Detailed Description

Helper struct to ensure the video buffer is locked and ready for drawing.

The destructor will make sure the buffer is unlocked no matter how the scope is exited.

Definition at line 203 of file video_driver.hpp.

## Constructor & Destructor Documentation

## ◆ VideoBufferLocker()

VideoDriver::VideoBufferLocker::VideoBufferLocker | ( |  | ) |
| inline

Definition at line 204 of file video_driver.hpp.

## ◆ ~VideoBufferLocker()

VideoDriver::VideoBufferLocker::~VideoBufferLocker | ( |  | ) |
| inline

Definition at line 209 of file video_driver.hpp.

## Field Documentation

## ◆ unlock

bool VideoDriver::VideoBufferLocker::unlock
| private

Stores if the lock did anything that has to be undone.

Definition at line 215 of file video_driver.hpp.

The documentation for this struct was generated from the following file:

- src/video/video_driver.hpp