GCAdapterConfigDiag: Cull includes in header file

Prevents dragging in unnecessary headers into other including files.
This commit is contained in:
Lioncash 2016-10-20 10:09:15 -04:00
parent 14facbc438
commit 24cf46aa5a
2 changed files with 18 additions and 20 deletions

View File

@ -2,13 +2,15 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "DolphinWX/Config/GCAdapterConfigDiag.h"
#include <wx/checkbox.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#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();
}

View File

@ -4,16 +4,9 @@
#pragma once
#include <cstddef>
#include <string>
#include <vector>
#include <wx/button.h>
#include <wx/dialog.h>
#include <wx/eventfilter.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#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);
};