Merge pull request #4369 from lioncash/config

DolphinWX: Minor include changes to config panes/dialogs
This commit is contained in:
JosJuice 2016-10-21 22:04:09 +02:00 committed by GitHub
commit 2fc2baf376
5 changed files with 24 additions and 20 deletions

View File

@ -4,8 +4,11 @@
#pragma once
#include <ctime>
#include <wx/panel.h>
#include "Common/CommonTypes.h"
class DolphinSlider;
class wxCheckBox;
class wxDatePickerCtrl;

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);
};

View File

@ -7,6 +7,8 @@
#include <wx/arrstr.h>
#include <wx/panel.h>
enum TEXIDevices : int;
class wxButton;
class wxCheckBox;
class wxChoice;

View File

@ -4,6 +4,7 @@
#pragma once
#include <vector>
#include <wx/arrstr.h>
#include <wx/panel.h>