From 1898524c9620eb1669aea0df1904fe459abc916d Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 23 Jan 2014 23:39:20 +0100 Subject: [PATCH] VideoCommon: fix "Buffer not large enough for all vertices!" --- Source/Core/VideoCommon/VertexManagerBase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp index 96d0ce3431..18a6c81dd6 100644 --- a/Source/Core/VideoCommon/VertexManagerBase.cpp +++ b/Source/Core/VideoCommon/VertexManagerBase.cpp @@ -61,7 +61,8 @@ void VertexManager::PrepareForAdditionalData(int primitive, u32 count, u32 strid current_primitive_type = primitive_from_gx[primitive]; // Check for size in buffer, if the buffer gets full, call Flush() - if (count > IndexGenerator::GetRemainingIndices() || count > GetRemainingIndices(primitive) || needed_vertex_bytes > GetRemainingSize()) + if ( !IsFlushed && ( count > IndexGenerator::GetRemainingIndices() || + count > GetRemainingIndices(primitive) || needed_vertex_bytes > GetRemainingSize() ) ) { Flush();