From 31581763a3f0ab600400eccc0a786763e210f625 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 1 Apr 2020 20:24:24 +1000 Subject: [PATCH] GPU: Correct starting position for polyline terminator search Fixes broken visuals in Wild Arms, probably others. --- src/core/gpu_commands.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/gpu_commands.cpp b/src/core/gpu_commands.cpp index 73b5b24a4..08358491b 100644 --- a/src/core/gpu_commands.cpp +++ b/src/core/gpu_commands.cpp @@ -256,7 +256,7 @@ bool GPU::HandleRenderCommand(const u32*& command_ptr, u32 command_size) // is on the first word for the vertex num_vertices = 2; bool found_terminator = false; - for (u32 pos = words_per_vertex * 2; pos < command_size; pos += words_per_vertex) + for (u32 pos = rc.shading_enable ? 4 : 3; pos < command_size; pos += words_per_vertex) { if ((command_ptr[pos] & UINT32_C(0xF000F000)) == UINT32_C(0x50005000)) {