summaryrefslogtreecommitdiff
path: root/src/video/video_driver.hpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2017-03-11 13:05:54 +0000
committerfrosch <frosch@openttd.org>2017-03-11 13:05:54 +0000
commitb1fe837b8ea3b42ab062ed1856d7bed53d5a2473 (patch)
treef3d63ee5f9d9a35d1790e35efc47afb7b56b2eb1 /src/video/video_driver.hpp
parentd5f82bf55b8a0e4c522066118a6e0d980651ae92 (diff)
downloadopenttd-b1fe837b8ea3b42ab062ed1856d7bed53d5a2473.tar.xz
(svn r27775) -Fix [FS#6510]: Insufficient thread synchronisation when switching blitters. (JGR)
Diffstat (limited to 'src/video/video_driver.hpp')
-rw-r--r--src/video/video_driver.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/video/video_driver.hpp b/src/video/video_driver.hpp
index 916044d35..5cb3c6cc3 100644
--- a/src/video/video_driver.hpp
+++ b/src/video/video_driver.hpp
@@ -49,6 +49,7 @@ public:
/**
* Callback invoked after the blitter was changed.
+ * This may only be called between AcquireBlitterLock and ReleaseBlitterLock.
* @return True if no error.
*/
virtual bool AfterBlitterChange()
@@ -56,6 +57,18 @@ public:
return true;
}
+ /**
+ * Acquire any lock(s) required to be held when changing blitters.
+ * These lock(s) may not be acquired recursively.
+ */
+ virtual void AcquireBlitterLock() { }
+
+ /**
+ * Release any lock(s) required to be held when changing blitters.
+ * These lock(s) may not be acquired recursively.
+ */
+ virtual void ReleaseBlitterLock() { }
+
virtual bool ClaimMousePointer()
{
return true;