2015-05-24 04:32:32 +00:00
|
|
|
// Copyright 2010 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2010-07-03 08:04:10 +00:00
|
|
|
|
2014-11-22 20:29:13 +00:00
|
|
|
#include <array>
|
2014-02-17 10:18:15 +00:00
|
|
|
#include <map>
|
2014-02-22 22:36:30 +00:00
|
|
|
#include <wx/dialog.h>
|
2010-07-03 08:04:10 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
#include "Common/SysConf.h"
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "Core/ConfigManager.h"
|
|
|
|
#include "Core/HW/Wiimote.h"
|
2015-12-31 16:27:51 +00:00
|
|
|
#include "InputCommon/GCAdapter.h"
|
2014-02-22 22:36:30 +00:00
|
|
|
|
2014-08-31 04:04:15 +00:00
|
|
|
class InputConfig;
|
2014-02-22 22:36:30 +00:00
|
|
|
class wxButton;
|
2014-11-21 16:55:18 +00:00
|
|
|
class wxStaticBoxSizer;
|
2011-08-06 14:38:23 +00:00
|
|
|
|
2014-11-22 21:39:48 +00:00
|
|
|
class ControllerConfigDiag : public wxDialog
|
2010-07-03 08:04:10 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
ControllerConfigDiag(wxWindow* const parent);
|
2011-08-06 14:38:23 +00:00
|
|
|
|
2015-04-28 00:48:04 +00:00
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
void RefreshRealWiimotes(wxCommandEvent& event);
|
|
|
|
|
|
|
|
void ConfigEmulatedWiimote(wxCommandEvent& event);
|
|
|
|
|
|
|
|
void SelectSource(wxCommandEvent& event);
|
|
|
|
void RevertSource();
|
|
|
|
|
|
|
|
void Save(wxCommandEvent& event);
|
|
|
|
|
|
|
|
void OnSensorBarPos(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.BAR", event.GetInt());
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnSensorBarSensitivity(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.SENS", event.GetInt());
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnSpeakerVolume(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.SPKV", event.GetInt());
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnMotor(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_SYSCONF->SetData("BT.MOT", event.GetInt());
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnContinuousScanning(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_WiimoteContinuousScanning = event.IsChecked();
|
2016-07-07 13:40:14 +00:00
|
|
|
WiimoteReal::Initialize(Wiimote::InitializeMode::DO_NOT_WAIT_FOR_WIIMOTES);
|
2016-06-24 08:43:46 +00:00
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnEnableSpeaker(wxCommandEvent& event)
|
|
|
|
{
|
|
|
|
SConfig::GetInstance().m_WiimoteEnableSpeaker = event.IsChecked();
|
|
|
|
event.Skip();
|
|
|
|
}
|
|
|
|
|
|
|
|
wxStaticBoxSizer* CreateGamecubeSizer();
|
|
|
|
wxStaticBoxSizer* CreateWiimoteConfigSizer();
|
|
|
|
wxStaticBoxSizer* CreateBalanceBoardSizer();
|
|
|
|
wxStaticBoxSizer* CreateRealWiimoteSizer();
|
|
|
|
wxStaticBoxSizer* CreateGeneralWiimoteSettingsSizer();
|
|
|
|
|
|
|
|
void Cancel(wxCommandEvent& event);
|
|
|
|
void OnGameCubePortChanged(wxCommandEvent& event);
|
|
|
|
void OnGameCubeConfigButton(wxCommandEvent& event);
|
|
|
|
|
|
|
|
std::map<wxWindowID, unsigned int> m_gc_port_choice_ids;
|
|
|
|
std::map<wxWindowID, unsigned int> m_gc_port_config_ids;
|
2016-08-10 17:23:21 +00:00
|
|
|
std::array<wxString, 8> m_gc_pad_type_strs;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
|
|
|
std::map<wxWindowID, unsigned int> m_wiimote_index_from_ctrl_id;
|
|
|
|
unsigned int m_orig_wiimote_sources[MAX_BBMOTES];
|
|
|
|
|
|
|
|
wxButton* wiimote_configure_bt[MAX_WIIMOTES];
|
|
|
|
wxButton* gamecube_configure_bt[4];
|
|
|
|
std::map<wxWindowID, unsigned int> m_wiimote_index_from_conf_bt_id;
|
2010-07-03 08:04:10 +00:00
|
|
|
};
|