From 1a964891f83ef9332c425dd69fe2f277b8ceb992 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Sun, 20 Jun 2021 12:49:24 -0700 Subject: [PATCH] VertexLoader_Color: Use Common::swap24 --- Source/Core/VideoCommon/VertexLoader_Color.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoCommon/VertexLoader_Color.cpp b/Source/Core/VideoCommon/VertexLoader_Color.cpp index 36939557b8..b41272cbf1 100644 --- a/Source/Core/VideoCommon/VertexLoader_Color.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Color.cpp @@ -125,8 +125,8 @@ void Color_ReadIndex_24b_6666(VertexLoader* loader) { const auto index = DataRead(); const u8* data = VertexLoaderManager::cached_arraybases[CPArray::Color0 + loader->m_colIndex] + - (index * g_main_cp_state.array_strides[CPArray::Color0 + loader->m_colIndex]) - 1; - const u32 val = Common::swap32(data); + (index * g_main_cp_state.array_strides[CPArray::Color0 + loader->m_colIndex]); + const u32 val = Common::swap24(data); SetCol6666(loader, val); } @@ -167,7 +167,7 @@ void Color_ReadDirect_16b_4444(VertexLoader* loader) void Color_ReadDirect_24b_6666(VertexLoader* loader) { - SetCol6666(loader, Common::swap32(DataGetPosition() - 1)); + SetCol6666(loader, Common::swap24(DataGetPosition())); DataSkip(3); }