about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/engine/client/backend_sdl.cpp3
-rw-r--r--src/engine/client/graphics_threaded.cpp1
-rw-r--r--src/engine/client/graphics_threaded.h2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp
index 691d193c..3f74f87e 100644
--- a/src/engine/client/backend_sdl.cpp
+++ b/src/engine/client/backend_sdl.cpp
@@ -290,6 +290,9 @@ void CCommandProcessorFragment_SDL::Cmd_Shutdown(const SCommand_Shutdown *pComma
 void CCommandProcessorFragment_SDL::Cmd_Swap(const CCommandBuffer::SCommand_Swap *pCommand)
 {
 	GL_SwapBuffers(m_GLContext);
+
+	if(pCommand->m_Finish)
+		glFinish();
 }
 
 void CCommandProcessorFragment_SDL::Cmd_VideoModes(const CCommandBuffer::SCommand_VideoModes *pCommand)
diff --git a/src/engine/client/graphics_threaded.cpp b/src/engine/client/graphics_threaded.cpp
index 33670f7b..c6947e33 100644
--- a/src/engine/client/graphics_threaded.cpp
+++ b/src/engine/client/graphics_threaded.cpp
@@ -837,6 +837,7 @@ void CGraphics_Threaded::Swap()
 
 	// add swap command
 	CCommandBuffer::SCommand_Swap Cmd;
+	Cmd.m_Finish = g_Config.m_GfxFinish;
 	m_pCommandBuffer->AddCommand(Cmd);
 
 	// kick the command buffer
diff --git a/src/engine/client/graphics_threaded.h b/src/engine/client/graphics_threaded.h
index 51148f0f..f4f17ec2 100644
--- a/src/engine/client/graphics_threaded.h
+++ b/src/engine/client/graphics_threaded.h
@@ -199,6 +199,8 @@ public:
 	struct SCommand_Swap : public SCommand
 	{
 		SCommand_Swap() : SCommand(CMD_SWAP) {}
+
+		int m_Finish;
 	};
 
 	struct SCommand_Texture_Create : public SCommand