From d642abce46fa3a999f762b329ae0154891c7170a Mon Sep 17 00:00:00 2001 From: Matthew Parlane Date: Tue, 21 May 2013 23:31:41 +1200 Subject: [PATCH] Only show 4 config dialogs in wiimote config. --- Source/Core/DolphinWX/Src/InputConfigDiag.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/Src/InputConfigDiag.cpp b/Source/Core/DolphinWX/Src/InputConfigDiag.cpp index cd17c4c682..ef4ae8d29b 100644 --- a/Source/Core/DolphinWX/Src/InputConfigDiag.cpp +++ b/Source/Core/DolphinWX/Src/InputConfigDiag.cpp @@ -5,6 +5,7 @@ #include "InputConfigDiag.h" #include "UDPConfigDiag.h" #include "WxUtils.h" +#include "HW/Wiimote.h" void GamepadPage::ConfigUDPWii(wxCommandEvent &event) { @@ -947,7 +948,7 @@ InputConfigDialog::InputConfigDialog(wxWindow* const parent, InputPlugin& plugin , m_plugin(plugin) { m_pad_notebook = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize, wxNB_DEFAULT); - for (unsigned int i = 0; i < plugin.controllers.size(); ++i) + for (unsigned int i = 0; i < std::min(plugin.controllers.size(), (size_t)MAX_WIIMOTES); ++i) { GamepadPage* gp = new GamepadPage(m_pad_notebook, m_plugin, i, this); m_padpages.push_back(gp);