From b1fe837b8ea3b42ab062ed1856d7bed53d5a2473 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 11 Mar 2017 13:05:54 +0000 Subject: (svn r27775) -Fix [FS#6510]: Insufficient thread synchronisation when switching blitters. (JGR) --- src/video/win32_v.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/video/win32_v.cpp') 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 @@ -1333,11 +1333,18 @@ 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() -- cgit v1.2.3-54-g00ecf