diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2018-05-28 03:20:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-28 03:20:32 +0200 |
| commit | cece179d77b8abccfcdc379b33a78a6f5b218929 (patch) | |
| tree | 1827aa3de1162a70cd57618a184c955c5ce8fb35 /Source/Core/DolphinQt2/Config/ControllersWindow.cpp | |
| parent | 18a31e12fda5958bb139af55e4b8383b9b2eb289 (diff) | |
| parent | d0e2c353a0b885f6b11df09d6427a2fc03ef0115 (diff) | |
Merge pull request #6997 from spycrab/qt_gcadapter
Qt: Fix using GC Adapter requiring restart
Diffstat (limited to 'Source/Core/DolphinQt2/Config/ControllersWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/Config/ControllersWindow.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp index 7f8c98442e..b98ee62009 100644 --- a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "DolphinQt2/Config/ControllersWindow.h" + #include <QApplication> #include <QBoxLayout> #include <QCheckBox> @@ -29,13 +31,14 @@ #include "Core/IOS/IOS.h" #include "Core/IOS/USB/Bluetooth/BTReal.h" #include "Core/NetPlayProto.h" + #include "DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h" #include "DolphinQt2/Config/Mapping/MappingWindow.h" #include "DolphinQt2/QtUtils/WrapInScrollArea.h" #include "DolphinQt2/Settings.h" -#include "UICommon/UICommon.h" -#include "DolphinQt2/Config/ControllersWindow.h" +#include "InputCommon/GCAdapter.h" +#include "UICommon/UICommon.h" static const std::map<SerialInterface::SIDevices, int> s_gc_types = { {SerialInterface::SIDEVICE_NONE, 0}, {SerialInterface::SIDEVICE_GC_CONTROLLER, 1}, @@ -523,5 +526,11 @@ void ControllersWindow::SaveSettings() m_gc_buttons[i]->setEnabled(index != 0 && index != 6); } + + if (GCAdapter::UseAdapter()) + GCAdapter::StartScanThread(); + else + GCAdapter::StopScanThread(); + SConfig::GetInstance().SaveSettings(); } |
