From 4268090738cae8e393820596da3d51e678a62512 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sun, 2 Apr 2017 00:47:18 +0200 Subject: [PATCH] - switch OpenGLSWFrameBuffer to use m_Lock instead of LockCount --- src/gl/system/gl_swframebuffer.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gl/system/gl_swframebuffer.cpp b/src/gl/system/gl_swframebuffer.cpp index 6963b65ca..ee5c0d58d 100644 --- a/src/gl/system/gl_swframebuffer.cpp +++ b/src/gl/system/gl_swframebuffer.cpp @@ -1095,7 +1095,7 @@ bool OpenGLSWFrameBuffer::IsValid() bool OpenGLSWFrameBuffer::Lock(bool buffered) { - if (LockCount++ > 0) + if (m_Lock++ > 0) { return false; } @@ -1130,16 +1130,16 @@ bool OpenGLSWFrameBuffer::Lock(bool buffered) void OpenGLSWFrameBuffer::Unlock() { - if (LockCount == 0) + if (m_Lock == 0) { return; } - if (UpdatePending && LockCount == 1) + if (UpdatePending && m_Lock == 1) { Update(); } - else if (--LockCount == 0) + else if (--m_Lock == 0) { Buffer = nullptr; } @@ -1171,13 +1171,13 @@ void OpenGLSWFrameBuffer::Update() return; } - if (LockCount != 1) + if (m_Lock != 1) { I_FatalError("Framebuffer must have exactly 1 lock to be updated"); - if (LockCount > 0) + if (m_Lock > 0) { UpdatePending = true; - --LockCount; + --m_Lock; } return; } @@ -1220,7 +1220,7 @@ void OpenGLSWFrameBuffer::Update() BlitCycles.Clock(); #endif - LockCount = 0; + m_Lock = 0; Draw3DPart(In2D <= 1); if (In2D == 0) { @@ -1276,7 +1276,7 @@ void OpenGLSWFrameBuffer::Flip() bool OpenGLSWFrameBuffer::PaintToWindow() { - if (LockCount != 0) + if (m_Lock != 0) { return false; } @@ -1662,7 +1662,7 @@ void OpenGLSWFrameBuffer::GetScreenshotBuffer(const uint8_t *&buffer, int &pitch void OpenGLSWFrameBuffer::ReleaseScreenshotBuffer() { - if (LockCount > 0) + if (m_Lock > 0) { Super::ReleaseScreenshotBuffer(); }