From daa205990fa043092394931b85be6efdc37408df Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 28 Jun 2015 19:08:28 -0400 Subject: Use emplace() instead of insert() where applicable for maps. --- Source/Core/DolphinWX/ControllerConfigDiag.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source/Core/DolphinWX/ControllerConfigDiag.cpp') diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.cpp b/Source/Core/DolphinWX/ControllerConfigDiag.cpp index ab5e220764..ff5bafc44e 100644 --- a/Source/Core/DolphinWX/ControllerConfigDiag.cpp +++ b/Source/Core/DolphinWX/ControllerConfigDiag.cpp @@ -87,13 +87,13 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateGamecubeSizer() // Create an ID for the config button. const wxWindowID button_id = wxWindow::NewControlId(); - m_gc_port_config_ids.insert(std::make_pair(button_id, i)); + m_gc_port_config_ids.emplace(button_id, i); gamecube_configure_bt[i] = new wxButton(this, button_id, _("Configure"), wxDefaultPosition, wxSize(100, 25)); gamecube_configure_bt[i]->Bind(wxEVT_BUTTON, &ControllerConfigDiag::OnGameCubeConfigButton, this); // Create a control ID for the choice boxes on the fly. const wxWindowID choice_id = wxWindow::NewControlId(); - m_gc_port_choice_ids.insert(std::make_pair(choice_id, i)); + m_gc_port_choice_ids.emplace(choice_id, i); // Only add AM-Baseboard to the first pad. if (i == 0) @@ -223,10 +223,10 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer() // reserve four ids, so that we can calculate the index from the ids later on // Stupid wx 2.8 doesn't support reserving sequential IDs, so we need to do that more complicated.. int source_ctrl_id = wxWindow::NewControlId(); - m_wiimote_index_from_ctrl_id.insert(std::pair(source_ctrl_id, i)); + m_wiimote_index_from_ctrl_id.emplace(source_ctrl_id, i); int config_bt_id = wxWindow::NewControlId(); - m_wiimote_index_from_conf_bt_id.insert(std::pair(config_bt_id, i)); + m_wiimote_index_from_conf_bt_id.emplace(config_bt_id, i); wiimote_label[i] = new wxStaticText(this, wxID_ANY, wiimote_str); wiimote_source_ch[i] = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, src_choices.size(), src_choices.data()); @@ -284,7 +284,7 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateBalanceBoardSizer() wxFlexGridSizer* const bb_sizer = new wxFlexGridSizer(1, 5, 5); int source_ctrl_id = wxWindow::NewControlId(); - m_wiimote_index_from_ctrl_id.insert(std::pair(source_ctrl_id, WIIMOTE_BALANCE_BOARD)); + m_wiimote_index_from_ctrl_id.emplace(source_ctrl_id, WIIMOTE_BALANCE_BOARD); static const std::array src_choices = {{ _("None"), _("Real Balance Board") -- cgit v1.2.3 From ac8621ccabcdff890e0f1844e8a1b2362cb7f1c3 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 14 Jul 2015 12:34:16 +0200 Subject: GCAdapter: Disable the scanning thread when direct connect is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The goal of this commit is to let people who experience driver issues with libusb and windows disable the scanning thread (to avoid mouse issues, keyboard issues, and audio issues). Also disable the rumble setting when the adapter driver is not detected, and don’t do anything if libusb can’t init for some reason. --- Source/Core/DolphinWX/ControllerConfigDiag.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/DolphinWX/ControllerConfigDiag.cpp') diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.cpp b/Source/Core/DolphinWX/ControllerConfigDiag.cpp index ff5bafc44e..170439f1f5 100644 --- a/Source/Core/DolphinWX/ControllerConfigDiag.cpp +++ b/Source/Core/DolphinWX/ControllerConfigDiag.cpp @@ -174,6 +174,7 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateGamecubeSizer() m_adapter_status->SetLabelText(_("Driver Not Detected")); gamecube_adapter->Disable(); gamecube_adapter->SetValue(false); + gamecube_rumble->Disable(); } } else -- cgit v1.2.3