GCAdapterConfigDiag: Cull includes in header file
Prevents dragging in unnecessary headers into other including files.
This commit is contained in:
parent
14facbc438
commit
24cf46aa5a
|
@ -2,13 +2,15 @@
|
||||||
// Licensed under GPLv2+
|
// Licensed under GPLv2+
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "DolphinWX/Config/GCAdapterConfigDiag.h"
|
||||||
|
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
|
#include <wx/sizer.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "DolphinWX/Config/GCAdapterConfigDiag.h"
|
|
||||||
#include "InputCommon/GCAdapter.h"
|
#include "InputCommon/GCAdapter.h"
|
||||||
|
|
||||||
wxDEFINE_EVENT(wxEVT_ADAPTER_UPDATE, wxCommandEvent);
|
wxDEFINE_EVENT(wxEVT_ADAPTER_UPDATE, wxCommandEvent);
|
||||||
|
@ -57,6 +59,11 @@ GCAdapterConfigDiag::GCAdapterConfigDiag(wxWindow* const parent, const wxString&
|
||||||
Bind(wxEVT_ADAPTER_UPDATE, &GCAdapterConfigDiag::UpdateAdapter, this);
|
Bind(wxEVT_ADAPTER_UPDATE, &GCAdapterConfigDiag::UpdateAdapter, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GCAdapterConfigDiag::~GCAdapterConfigDiag()
|
||||||
|
{
|
||||||
|
GCAdapter::SetAdapterCallback(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
void GCAdapterConfigDiag::ScheduleAdapterUpdate()
|
void GCAdapterConfigDiag::ScheduleAdapterUpdate()
|
||||||
{
|
{
|
||||||
wxQueueEvent(this, new wxCommandEvent(wxEVT_ADAPTER_UPDATE));
|
wxQueueEvent(this, new wxCommandEvent(wxEVT_ADAPTER_UPDATE));
|
||||||
|
@ -72,7 +79,12 @@ void GCAdapterConfigDiag::UpdateAdapter(wxCommandEvent& ev)
|
||||||
Core::PauseAndLock(false, unpause);
|
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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,16 +4,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <wx/button.h>
|
|
||||||
#include <wx/dialog.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
|
class GCAdapterConfigDiag : public wxDialog
|
||||||
{
|
{
|
||||||
|
@ -28,13 +21,6 @@ private:
|
||||||
wxStaticText* m_adapter_status;
|
wxStaticText* m_adapter_status;
|
||||||
int m_pad_id;
|
int m_pad_id;
|
||||||
|
|
||||||
void OnAdapterRumble(wxCommandEvent& event)
|
void OnAdapterRumble(wxCommandEvent& event);
|
||||||
{
|
void OnAdapterKonga(wxCommandEvent& event);
|
||||||
SConfig::GetInstance().m_AdapterRumble[m_pad_id] = event.IsChecked();
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnAdapterKonga(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
SConfig::GetInstance().m_AdapterKonga[m_pad_id] = event.IsChecked();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue