GCAdapter: Add a setting to toggle rumble
This commit is contained in:
parent
57f458fe9b
commit
ec7445d66b
|
@ -354,6 +354,7 @@ void SConfig::SaveCoreSettings(IniFile& ini)
|
|||
core->Set("GFXBackend", m_LocalCoreStartupParameter.m_strVideoBackend);
|
||||
core->Set("GPUDeterminismMode", m_LocalCoreStartupParameter.m_strGPUDeterminismMode);
|
||||
core->Set("GameCubeAdapter", m_GameCubeAdapter);
|
||||
core->Set("AdapterRumble", m_AdapterRumble);
|
||||
}
|
||||
|
||||
void SConfig::SaveMovieSettings(IniFile& ini)
|
||||
|
@ -621,6 +622,7 @@ void SConfig::LoadCoreSettings(IniFile& ini)
|
|||
core->Get("GFXBackend", &m_LocalCoreStartupParameter.m_strVideoBackend, "");
|
||||
core->Get("GPUDeterminismMode", &m_LocalCoreStartupParameter.m_strGPUDeterminismMode, "auto");
|
||||
core->Get("GameCubeAdapter", &m_GameCubeAdapter, true);
|
||||
core->Get("AdapterRumble", &m_AdapterRumble, true);
|
||||
}
|
||||
|
||||
void SConfig::LoadMovieSettings(IniFile& ini)
|
||||
|
|
|
@ -116,6 +116,7 @@ struct SConfig : NonCopyable
|
|||
// Input settings
|
||||
bool m_BackgroundInput;
|
||||
bool m_GameCubeAdapter;
|
||||
bool m_AdapterRumble;
|
||||
|
||||
SysConf* m_SYSCONF;
|
||||
|
||||
|
|
|
@ -392,7 +392,7 @@ void Input(int chan, GCPadStatus* pad)
|
|||
|
||||
void Output(int chan, u8 rumble_command)
|
||||
{
|
||||
if (s_handle == nullptr || !SConfig::GetInstance().m_GameCubeAdapter)
|
||||
if (s_handle == nullptr || !SConfig::GetInstance().m_GameCubeAdapter || !SConfig::GetInstance().m_AdapterRumble)
|
||||
return;
|
||||
|
||||
// Skip over rumble commands if it has not changed or the controller is wireless
|
||||
|
|
|
@ -155,10 +155,16 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateGamecubeSizer()
|
|||
|
||||
wxCheckBox* const gamecube_adapter = new wxCheckBox(this, wxID_ANY, _("Direct Connect"));
|
||||
gamecube_adapter->Bind(wxEVT_CHECKBOX, &ControllerConfigDiag::OnGameCubeAdapter, this);
|
||||
|
||||
wxCheckBox* const gamecube_rumble = new wxCheckBox(this, wxID_ANY, _("Rumble"));
|
||||
gamecube_rumble->SetValue(SConfig::GetInstance().m_AdapterRumble);
|
||||
gamecube_rumble->Bind(wxEVT_CHECKBOX, &ControllerConfigDiag::OnAdapterRumble, this);
|
||||
|
||||
m_adapter_status = new wxStaticText(this, wxID_ANY, _("Adapter Not Detected"));
|
||||
|
||||
gamecube_adapter_sizer->Add(m_adapter_status, 0, wxEXPAND);
|
||||
gamecube_adapter_group->Add(m_adapter_status, 0, wxEXPAND);
|
||||
gamecube_adapter_sizer->Add(gamecube_adapter, 0, wxEXPAND);
|
||||
gamecube_adapter_sizer->Add(gamecube_rumble, 0, wxEXPAND);
|
||||
gamecube_adapter_group->Add(gamecube_adapter_sizer, 0, wxEXPAND);
|
||||
gamecube_static_sizer->Add(gamecube_adapter_group, 0, wxEXPAND);
|
||||
|
||||
|
|
|
@ -74,6 +74,11 @@ private:
|
|||
SConfig::GetInstance().m_GameCubeAdapter = event.IsChecked();
|
||||
event.Skip();
|
||||
}
|
||||
void OnAdapterRumble(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_AdapterRumble = event.IsChecked();
|
||||
}
|
||||
|
||||
|
||||
wxStaticBoxSizer* CreateGamecubeSizer();
|
||||
wxStaticBoxSizer* CreateWiimoteConfigSizer();
|
||||
|
|
Loading…
Reference in New Issue