summaryrefslogtreecommitdiff
path: root/src/video/sdl_v.h
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-02-20 10:49:27 +0100
committerPatric Stout <github@truebrain.nl>2021-02-20 17:08:44 +0100
commit761efbb4571397fe9e5f19049ca64663e12cbc1e (patch)
tree4eaa9b3380305f16999d7cd0c13b506d621a3c45 /src/video/sdl_v.h
parent661eb39ecc3a128c24dbbc4f53d1c075fe89bc93 (diff)
downloadopenttd-761efbb4571397fe9e5f19049ca64663e12cbc1e.tar.xz
Codechange: use (Un)LockVideoBuffer() to manage video buffer
Diffstat (limited to 'src/video/sdl_v.h')
-rw-r--r--src/video/sdl_v.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video/sdl_v.h b/src/video/sdl_v.h
index 1d3da9b6a..896a6f5b8 100644
--- a/src/video/sdl_v.h
+++ b/src/video/sdl_v.h
@@ -39,8 +39,12 @@ public:
protected:
void InputLoop() override;
+ bool LockVideoBuffer() override;
+ void UnlockVideoBuffer() override;
private:
+ std::unique_lock<std::recursive_mutex> draw_lock;
+
int PollEvent();
bool CreateMainSurface(uint w, uint h);
void SetupKeyboard();