diff --git a/rpcs3/Input/wiimote_handler.cpp b/rpcs3/Input/wiimote_handler.cpp index 1fe9956bf6..afcc3ac660 100644 --- a/rpcs3/Input/wiimote_handler.cpp +++ b/rpcs3/Input/wiimote_handler.cpp @@ -181,7 +181,7 @@ bool wiimote_device::update() m_state.acc_z = (buf[5] << 2) | ((buf[2] >> 6) & 1); // Each IR point is 3 bytes in Extended report 0x33. - for (usz j = 0; j < MAX_WIIMOTES; j++) + for (usz j = 0; j < MAX_WIIMOTE_IR_POINTS; j++) { const u8* ir = &buf[6 + j * 3]; m_state.ir[j].x = (ir[0] | ((ir[2] & 0x30) << 4)); diff --git a/rpcs3/Input/wiimote_handler.h b/rpcs3/Input/wiimote_handler.h index c70ca4d40e..6179938381 100644 --- a/rpcs3/Input/wiimote_handler.h +++ b/rpcs3/Input/wiimote_handler.h @@ -13,6 +13,7 @@ #include static constexpr usz MAX_WIIMOTES = 4; +static constexpr usz MAX_WIIMOTE_IR_POINTS = 4; struct wiimote_ir_point { @@ -60,7 +61,7 @@ struct wiimote_state s16 acc_x = 0; s16 acc_y = 0; s16 acc_z = 0; - std::array ir {}; + std::array ir {}; bool connected = false; }; diff --git a/rpcs3/rpcs3qt/wiimote_settings_dialog.cpp b/rpcs3/rpcs3qt/wiimote_settings_dialog.cpp index da6af9cd2a..e0d93a620f 100644 --- a/rpcs3/rpcs3qt/wiimote_settings_dialog.cpp +++ b/rpcs3/rpcs3qt/wiimote_settings_dialog.cpp @@ -183,7 +183,7 @@ void wiimote_settings_dialog::update_state() painter.drawLine(pixmap.width() / 2, 0, pixmap.width() / 2, pixmap.height()); painter.drawLine(0, pixmap.height() / 2, pixmap.width(), pixmap.height() / 2); - static const std::array colors = { Qt::red, Qt::green, Qt::blue, Qt::yellow }; + static const std::array colors = { Qt::red, Qt::green, Qt::blue, Qt::yellow }; for (usz i = 0; i < state.ir.size(); ++i) {