From 3630de99ed48e40279bd08107a49f3b055f73efd Mon Sep 17 00:00:00 2001 From: degasus Date: Sun, 18 Jan 2015 04:22:36 +0100 Subject: [PATCH] VideoSW: Fix vertex skipping --- Source/Core/VideoBackends/Software/SWVertexLoader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp index ca26868636..752cea9a5b 100644 --- a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp +++ b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp @@ -173,13 +173,16 @@ void SWVertexLoader::LoadVertex() // convert the vertex from the gc format to the videocommon (hardware optimized) format u8* old = g_video_buffer_read_ptr; - m_CurrentLoader->RunVertices( + int converted_vertices = m_CurrentLoader->RunVertices( m_primitiveType, 1, DataReader(g_video_buffer_read_ptr, nullptr), // src DataReader(m_LoadedVertices.data(), m_LoadedVertices.data() + m_LoadedVertices.size()) // dst ); g_video_buffer_read_ptr = old + m_CurrentLoader->m_VertexSize; + if (converted_vertices == 0) + return; + // parse the videocommon format to our own struct format (m_Vertex) ParseVertex(vdec);