summaryrefslogtreecommitdiff
path: root/src/video/win32_v.cpp
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/win32_v.cpp
parentd5f82bf55b8a0e4c522066118a6e0d980651ae92 (diff)
downloadopenttd-b1fe837b8ea3b42ab062ed1856d7bed53d5a2473.tar.xz
(svn r27775) -Fix [FS#6510]: Insufficient thread synchronisation when switching blitters. (JGR)
Diffstat (limited to 'src/video/win32_v.cpp')
-rw-r--r--src/video/win32_v.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index c37ebd7dd..e536ae8e5 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -1334,10 +1334,17 @@ bool VideoDriver_Win32::ToggleFullscreen(bool full_screen)
bool VideoDriver_Win32::AfterBlitterChange()
{
+ return AllocateDibSection(_screen.width, _screen.height, true) && this->MakeWindow(_fullscreen);
+}
+
+void VideoDriver_Win32::AcquireBlitterLock()
+{
if (_draw_mutex != NULL) _draw_mutex->BeginCritical(true);
- bool ret = AllocateDibSection(_screen.width, _screen.height, true) && this->MakeWindow(_fullscreen);
+}
+
+void VideoDriver_Win32::ReleaseBlitterLock()
+{
if (_draw_mutex != NULL) _draw_mutex->EndCritical(true);
- return ret;
}
void VideoDriver_Win32::EditBoxLostFocus()