diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2018-05-13 18:17:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-13 18:17:13 +0200 |
| commit | 17795a615bc441e84f23f9d6f8f551a50f94220a (patch) | |
| tree | 29e7898f3ee01a473d9484dbd0d71f562492b0e6 /Source/Core/DolphinQt2/Config/ControllersWindow.cpp | |
| parent | 5564150dd69e1f86e3d1003dfa9ef7c2b01516f2 (diff) | |
| parent | 2ca75ae05a10b452c5f6d692eb3457513937c156 (diff) | |
Merge pull request #6838 from spycrab/qt_map_save
Qt/ControllersWindow: Fix changing devices while emulation is running
Diffstat (limited to 'Source/Core/DolphinQt2/Config/ControllersWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/Config/ControllersWindow.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp index e3269e8de1..7f8c98442e 100644 --- a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp @@ -297,6 +297,8 @@ void ControllersWindow::OnWiimoteTypeChanged(int type) return; } } + + SaveSettings(); } void ControllersWindow::OnGCTypeChanged(int type) @@ -312,6 +314,8 @@ void ControllersWindow::OnGCTypeChanged(int type) return; } } + + SaveSettings(); } void ControllersWindow::OnBluetoothPassthroughResetPressed() @@ -498,6 +502,9 @@ void ControllersWindow::SaveSettings() const int index = m_wiimote_boxes[i]->currentIndex(); g_wiimote_sources[i] = index; m_wiimote_buttons[i]->setEnabled(index != 0 && index != 2); + + if (Core::IsRunning()) + WiimoteReal::ChangeWiimoteSource(static_cast<u32>(i), index); } UICommon::SaveWiimoteSources(); @@ -507,7 +514,13 @@ void ControllersWindow::SaveSettings() const int index = m_gc_controller_boxes[i]->currentIndex(); const std::optional<SerialInterface::SIDevices> si_device = FromGCMenuIndex(index); if (si_device) + { SConfig::GetInstance().m_SIDevice[i] = *si_device; + + if (Core::IsRunning()) + SerialInterface::ChangeDevice(*si_device, static_cast<s32>(i)); + } + m_gc_buttons[i]->setEnabled(index != 0 && index != 6); } SConfig::GetInstance().SaveSettings(); |
