diff --git a/src/common/d3d11/shader_compiler.cpp b/src/common/d3d11/shader_compiler.cpp index 7365e6c9..2bdc66b0 100644 --- a/src/common/d3d11/shader_compiler.cpp +++ b/src/common/d3d11/shader_compiler.cpp @@ -17,21 +17,21 @@ ComPtr CompileShader(Type type, D3D_FEATURE_LEVEL feature_level, std:: { case D3D_FEATURE_LEVEL_10_0: { - static constexpr std::array targets = {{"vs_4_0", "gs_4_0", "ps_4_0", "cs_4_0"}}; + static const char* targets[4] = {"vs_4_0", "gs_4_0", "ps_4_0", "cs_4_0"}; target = targets[static_cast(type)]; } break; case D3D_FEATURE_LEVEL_10_1: { - static constexpr std::array targets = {{"vs_4_1", "gs_4_1", "ps_4_1", "cs_4_1"}}; + static const char* targets[4] = {"vs_4_1", "gs_4_1", "ps_4_1", "cs_4_1"}; target = targets[static_cast(type)]; } break; case D3D_FEATURE_LEVEL_11_0: { - static constexpr std::array targets = {{"vs_5_0", "gs_5_0", "ps_5_0", "cs_5_0"}}; + static const char* targets[4] = {"vs_5_0", "gs_5_0", "ps_5_0", "cs_5_0"}; target = targets[static_cast(type)]; } break; @@ -39,7 +39,7 @@ ComPtr CompileShader(Type type, D3D_FEATURE_LEVEL feature_level, std:: case D3D_FEATURE_LEVEL_11_1: default: { - static constexpr std::array targets = {{"vs_5_1", "gs_5_1", "ps_5_1", "cs_5_1"}}; + static const char* targets[4] = {"vs_5_1", "gs_5_1", "ps_5_1", "cs_5_1"}; target = targets[static_cast(type)]; } break; diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index 8292e586..ae9a8929 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -19,7 +19,7 @@ struct CommandInfo u8 expected_parameters; }; -static std::array s_command_info = {{ +static CommandInfo s_command_info[255] = { {"Sync", 0}, {"Getstat", 0}, {"Setloc", 3}, {"Play", 0}, {"Forward", 0}, {"Backward", 0}, {"ReadN", 0}, {"MotorOn", 0}, {"Stop", 0}, {"Pause", 0}, {"Reset", 0}, {"Mute", 0}, {"Demute", 0}, {"Setfilter", 2}, {"Setmode", 1}, {"Getparam", 0}, {"GetlocL", 0}, {"GetlocP", 0}, @@ -63,7 +63,7 @@ static std::array s_command_info = {{ {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {"Unknown", 0}, {nullptr, 0} // Unknown -}}; +}; CDROM g_cdrom; diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index b4a48849..0f0d8c81 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -494,6 +494,7 @@ void GPU_HW::LoadVertices() { case GPUPrimitive::Polygon: { + u16 native_texcoords[4]; const u32 first_color = rc.color_for_first_vertex; const bool shaded = rc.shading_enable; const bool textured = rc.texture_enable; @@ -502,7 +503,6 @@ void GPU_HW::LoadVertices() const u32 num_vertices = rc.quad_polygon ? 4 : 3; std::array vertices; std::array, 4> native_vertex_positions; - std::array native_texcoords; bool valid_w = g_settings.gpu_pgxp_texture_correction; for (u32 i = 0; i < num_vertices; i++) { diff --git a/src/core/mdec.cpp b/src/core/mdec.cpp index 44ffc425..26e8cfc1 100644 --- a/src/core/mdec.cpp +++ b/src/core/mdec.cpp @@ -511,10 +511,10 @@ void MDEC::CopyOutBlock() Execute(); } -static constexpr std::array zagzig = {{0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, +static u8 zagzig[64] = {0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, - 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63}}; + 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63}; bool MDEC::rl_decode_block(s16* blk, const u8* qt) { @@ -597,7 +597,7 @@ void MDEC::IDCT(s16* blk) void MDEC::IDCT_New(s16* blk) { - std::array temp; + s32 temp[64]; for (u32 x = 0; x < 8; x++) { for (u32 y = 0; y < 8; y++) @@ -624,7 +624,7 @@ void MDEC::IDCT_New(s16* blk) void MDEC::IDCT_Old(s16* blk) { - std::array temp_buffer; + s64 temp_buffer[64]; for (u32 x = 0; x < 8; x++) { for (u32 y = 0; y < 8; y++)