diff options
author | Patric Stout <truebrain@openttd.org> | 2021-02-20 10:49:27 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-02-20 17:08:44 +0100 |
commit | 761efbb4571397fe9e5f19049ca64663e12cbc1e (patch) | |
tree | 4eaa9b3380305f16999d7cd0c13b506d621a3c45 /src/video/win32_v.h | |
parent | 661eb39ecc3a128c24dbbc4f53d1c075fe89bc93 (diff) | |
download | openttd-761efbb4571397fe9e5f19049ca64663e12cbc1e.tar.xz |
Codechange: use (Un)LockVideoBuffer() to manage video buffer
Diffstat (limited to 'src/video/win32_v.h')
-rw-r--r-- | src/video/win32_v.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video/win32_v.h b/src/video/win32_v.h index a6219dfd0..0a80afc4d 100644 --- a/src/video/win32_v.h +++ b/src/video/win32_v.h @@ -45,9 +45,15 @@ protected: Dimension GetScreenSize() const override; float GetDPIScale() override; void InputLoop() override; + bool LockVideoBuffer() override; + void UnlockVideoBuffer() override; private: + std::unique_lock<std::recursive_mutex> draw_lock; + void CheckPaletteAnim(); + + static void PaintThreadThunk(VideoDriver_Win32 *drv); }; /** The factory for Windows' video driver. */ |