mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
8d4a47d40c
The libusb driver must be installed on the adapter (e.g. zadig can be used to install the driver in Windows). GameCube pad controllers are supported and will override the current input device assigned to the port. GameCube controller buttons are auto-configured and cannot be re-assigned. Rumble is supported. Hotplug is supported while playing a game. If a controller is unplugged from the adapter, Dolphin will fallback to using the host input device on that port. If a port on the adapter is unused, Dolphin will use the host input device for that port, allowing a mixture of host input devices and controllers connected to the adapter. The adapter support can be disabled in the Controllers config if the OS driver is preferred (allowing the pad buttons to be reconfigured). One adapter per system is supported.
89 lines
2.3 KiB
C++
89 lines
2.3 KiB
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <map>
|
|
#include <wx/dialog.h>
|
|
#include <wx/event.h>
|
|
#include <wx/windowid.h>
|
|
|
|
#include "Common/SysConf.h"
|
|
#include "Core/ConfigManager.h"
|
|
#include "Core/HW/Wiimote.h"
|
|
|
|
class InputConfig;
|
|
class wxButton;
|
|
class wxStaticBoxSizer;
|
|
class wxWindow;
|
|
|
|
class ControllerConfigDiag : public wxDialog
|
|
{
|
|
public:
|
|
ControllerConfigDiag(wxWindow* const parent);
|
|
|
|
void RefreshRealWiimotes(wxCommandEvent& event);
|
|
|
|
void SelectSource(wxCommandEvent& event);
|
|
void RevertSource();
|
|
|
|
void ConfigEmulatedWiimote(wxCommandEvent& event);
|
|
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();
|
|
WiimoteReal::Initialize();
|
|
event.Skip();
|
|
}
|
|
void OnEnableSpeaker(wxCommandEvent& event)
|
|
{
|
|
SConfig::GetInstance().m_WiimoteEnableSpeaker = event.IsChecked();
|
|
event.Skip();
|
|
}
|
|
void OnGameCubeAdapter(wxCommandEvent& event)
|
|
{
|
|
SConfig::GetInstance().m_GameCubeAdapter = event.IsChecked();
|
|
event.Skip();
|
|
}
|
|
|
|
private:
|
|
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;
|
|
static const std::array<wxString, 7> m_gc_pad_type_strs;
|
|
|
|
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];
|
|
std::map<wxWindowID, unsigned int> m_wiimote_index_from_conf_bt_id;
|
|
};
|