diff options
| author | skidau <skidau@gmail.com> | 2015-03-05 19:49:10 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2015-03-08 20:27:13 +1100 |
| commit | 780eef68f6ec7deee1a11f8bc1386f70133b6cc0 (patch) | |
| tree | 9817364bdf1ac1e9ff73de1029a07e45b32c8f5e /Source/Core/DolphinWX/InputConfigDiag.cpp | |
| parent | b446ea013241fc28797f5bfdfdb40b374394baed (diff) | |
Fixed the crash that would occur when the Refresh button was pressed in the controllers config.
- Simplified the locking mechanism when controllers were updated
- Reloaded the config of the controls instead of re-initialising the control plugins
- Fixed controls being unresponsive after the Refresh button was pressed
- Disables the hotkeys while the controller config is open
Diffstat (limited to 'Source/Core/DolphinWX/InputConfigDiag.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/InputConfigDiag.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/InputConfigDiag.cpp b/Source/Core/DolphinWX/InputConfigDiag.cpp index 653f92ea11..d45458535a 100644 --- a/Source/Core/DolphinWX/InputConfigDiag.cpp +++ b/Source/Core/DolphinWX/InputConfigDiag.cpp @@ -44,6 +44,10 @@ #include "Common/FileUtil.h" #include "Common/IniFile.h" #include "Common/MsgHandler.h" +#include "Core/Core.h" +#include "Core/HotkeyManager.h" +#include "Core/HW/GCKeyboard.h" +#include "Core/HW/GCPad.h" #include "Core/HW/Wiimote.h" #include "DolphinWX/InputConfigDiag.h" #include "DolphinWX/WxUtils.h" @@ -740,6 +744,8 @@ void InputConfigDialog::UpdateDeviceComboBox() void GamepadPage::RefreshDevices(wxCommandEvent&) { + bool was_unpaused = Core::PauseAndLock(true); + std::lock_guard<std::recursive_mutex> lk(m_config.controls_lock); // refresh devices @@ -750,6 +756,14 @@ void GamepadPage::RefreshDevices(wxCommandEvent&) // update device cbox m_config_dialog->UpdateDeviceComboBox(); + + //if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) + Wiimote::LoadConfig(); + Keyboard::LoadConfig(); + Pad::LoadConfig(); + HotkeyManagerEmu::LoadConfig(); + + Core::PauseAndLock(false, was_unpaused); } ControlGroupBox::~ControlGroupBox() |
