diff --git a/Source/Core/DolphinWX/Config/GCAdapterConfigDiag.cpp b/Source/Core/DolphinWX/Config/GCAdapterConfigDiag.cpp index 975502718a..66ab071a4c 100644 --- a/Source/Core/DolphinWX/Config/GCAdapterConfigDiag.cpp +++ b/Source/Core/DolphinWX/Config/GCAdapterConfigDiag.cpp @@ -2,13 +2,15 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "DolphinWX/Config/GCAdapterConfigDiag.h" + #include +#include #include #include "Common/CommonTypes.h" #include "Core/ConfigManager.h" #include "Core/Core.h" -#include "DolphinWX/Config/GCAdapterConfigDiag.h" #include "InputCommon/GCAdapter.h" wxDEFINE_EVENT(wxEVT_ADAPTER_UPDATE, wxCommandEvent); @@ -57,6 +59,11 @@ GCAdapterConfigDiag::GCAdapterConfigDiag(wxWindow* const parent, const wxString& Bind(wxEVT_ADAPTER_UPDATE, &GCAdapterConfigDiag::UpdateAdapter, this); } +GCAdapterConfigDiag::~GCAdapterConfigDiag() +{ + GCAdapter::SetAdapterCallback(nullptr); +} + void GCAdapterConfigDiag::ScheduleAdapterUpdate() { wxQueueEvent(this, new wxCommandEvent(wxEVT_ADAPTER_UPDATE)); @@ -72,7 +79,12 @@ void GCAdapterConfigDiag::UpdateAdapter(wxCommandEvent& ev) Core::PauseAndLock(false, unpause); } -GCAdapterConfigDiag::~GCAdapterConfigDiag() +void GCAdapterConfigDiag::OnAdapterRumble(wxCommandEvent& event) { - GCAdapter::SetAdapterCallback(nullptr); + SConfig::GetInstance().m_AdapterRumble[m_pad_id] = event.IsChecked(); +} + +void GCAdapterConfigDiag::OnAdapterKonga(wxCommandEvent& event) +{ + SConfig::GetInstance().m_AdapterKonga[m_pad_id] = event.IsChecked(); } diff --git a/Source/Core/DolphinWX/Config/GCAdapterConfigDiag.h b/Source/Core/DolphinWX/Config/GCAdapterConfigDiag.h index 233d4085ef..a8ce4f0d2a 100644 --- a/Source/Core/DolphinWX/Config/GCAdapterConfigDiag.h +++ b/Source/Core/DolphinWX/Config/GCAdapterConfigDiag.h @@ -4,16 +4,9 @@ #pragma once -#include -#include -#include -#include #include -#include -#include -#include -#include "Core/ConfigManager.h" +class wxStaticText; class GCAdapterConfigDiag : public wxDialog { @@ -28,13 +21,6 @@ private: wxStaticText* m_adapter_status; int m_pad_id; - void OnAdapterRumble(wxCommandEvent& event) - { - SConfig::GetInstance().m_AdapterRumble[m_pad_id] = event.IsChecked(); - } - - void OnAdapterKonga(wxCommandEvent& event) - { - SConfig::GetInstance().m_AdapterKonga[m_pad_id] = event.IsChecked(); - } + void OnAdapterRumble(wxCommandEvent& event); + void OnAdapterKonga(wxCommandEvent& event); };