diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp index 27e24e6f28..d46ce9ebf4 100644 --- a/Source/Core/VideoCommon/VertexLoaderX64.cpp +++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp @@ -459,8 +459,9 @@ void VertexLoaderX64::GenerateVertexLoader() if (m_VtxDesc.low.Normal != VertexComponentFormat::NotPresent) { - static const u8 map[8] = {7, 6, 15, 14}; - const u8 scaling_exponent = map[u32(m_VtxAttr.g0.NormalFormat.Value())]; + static constexpr Common::EnumMap(7)> SCALE_MAP = {7, 6, 15, 14, + 0, 0, 0, 0}; + const u8 scaling_exponent = SCALE_MAP[m_VtxAttr.g0.NormalFormat]; const int limit = m_VtxAttr.g0.NormalElements == NormalComponentCount::NTB ? 3 : 1; for (int i = 0; i < limit; i++)