mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Move 'Background Input' to controller config dialog
This commit is contained in:
parent
8adad0729e
commit
24a5411af5
@ -10,7 +10,6 @@
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/Buttons.h"
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
|
||||
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/BackgroundInputSetting.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/BooleanSetting.h"
|
||||
#include "InputCommon/KeyboardStatus.h"
|
||||
|
||||
@ -81,8 +80,6 @@ GCKeyboard::GCKeyboard(const unsigned int index) : m_index(index)
|
||||
|
||||
// options
|
||||
groups.emplace_back(m_options = new ControllerEmu::ControlGroup(_trans("Options")));
|
||||
m_options->boolean_settings.emplace_back(
|
||||
std::make_unique<ControllerEmu::BackgroundInputSetting>(_trans("Background Input")));
|
||||
m_options->boolean_settings.emplace_back(std::make_unique<ControllerEmu::BooleanSetting>(
|
||||
_trans("Iterative Input"), false, ControllerEmu::SettingType::VIRTUAL));
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/Buttons.h"
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/MixedTriggers.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/BackgroundInputSetting.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/BooleanSetting.h"
|
||||
#include "InputCommon/GCPadStatus.h"
|
||||
|
||||
@ -79,8 +78,6 @@ GCPad::GCPad(const unsigned int index) : m_index(index)
|
||||
|
||||
// options
|
||||
groups.emplace_back(m_options = new ControllerEmu::ControlGroup(_trans("Options")));
|
||||
m_options->boolean_settings.emplace_back(
|
||||
std::make_unique<ControllerEmu::BackgroundInputSetting>(_trans("Background Input")));
|
||||
m_options->boolean_settings.emplace_back(std::make_unique<ControllerEmu::BooleanSetting>(
|
||||
_trans("Iterative Input"), false, ControllerEmu::SettingType::VIRTUAL));
|
||||
}
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/Force.h"
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/ModifySettingsButton.h"
|
||||
#include "InputCommon/ControllerEmu/ControlGroup/Tilt.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/BackgroundInputSetting.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/BooleanSetting.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
|
||||
|
||||
@ -296,8 +295,6 @@ Wiimote::Wiimote(const unsigned int index)
|
||||
|
||||
// options
|
||||
groups.emplace_back(m_options = new ControllerEmu::ControlGroup(_trans("Options")));
|
||||
m_options->boolean_settings.emplace_back(
|
||||
std::make_unique<ControllerEmu::BackgroundInputSetting>(_trans("Background Input")));
|
||||
m_options->boolean_settings.emplace_back(std::make_unique<ControllerEmu::BooleanSetting>(
|
||||
"Sideways Wiimote", _trans("Sideways Wii Remote"), false));
|
||||
m_options->boolean_settings.emplace_back(std::make_unique<ControllerEmu::BooleanSetting>(
|
||||
|
@ -60,6 +60,8 @@ ControllerConfigDiag::ControllerConfigDiag(wxWindow* const parent)
|
||||
main_sizer->AddSpacer(space5);
|
||||
main_sizer->Add(CreateWiimoteConfigSizer(), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
||||
main_sizer->AddSpacer(space5);
|
||||
main_sizer->Add(CreateAdvancedSettingsSizer(), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
||||
main_sizer->AddSpacer(space5);
|
||||
main_sizer->Add(CreateButtonSizer(wxCLOSE | wxNO_DEFAULT), 0, wxEXPAND | wxLEFT | wxRIGHT,
|
||||
space5);
|
||||
main_sizer->AddSpacer(space5);
|
||||
@ -220,6 +222,25 @@ wxSizer* ControllerConfigDiag::CreateGamecubeSizer()
|
||||
return gamecube_static_sizer;
|
||||
}
|
||||
|
||||
void ControllerConfigDiag::OnBackgroundInputChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_BackgroundInput = event.IsChecked();
|
||||
}
|
||||
|
||||
wxSizer* ControllerConfigDiag::CreateAdvancedSettingsSizer()
|
||||
{
|
||||
const int space5 = FromDIP(5);
|
||||
|
||||
m_background_input_checkbox = new wxCheckBox(this, wxID_ANY, _("Background Input"));
|
||||
m_background_input_checkbox->SetValue(SConfig::GetInstance().m_BackgroundInput);
|
||||
m_background_input_checkbox->Bind(wxEVT_CHECKBOX, &ControllerConfigDiag::OnBackgroundInputChanged,
|
||||
this);
|
||||
|
||||
auto* const box = new wxStaticBoxSizer(wxVERTICAL, this, _("Advanced Settings"));
|
||||
box->Add(m_background_input_checkbox, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
||||
return box;
|
||||
}
|
||||
|
||||
wxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer()
|
||||
{
|
||||
const int space5 = FromDIP(5);
|
||||
|
@ -30,6 +30,7 @@ private:
|
||||
wxSizer* CreateWiimoteConfigSizer();
|
||||
wxSizer* CreatePassthroughBTConfigSizer();
|
||||
wxSizer* CreateEmulatedBTConfigSizer();
|
||||
wxSizer* CreateAdvancedSettingsSizer();
|
||||
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void OnCloseButton(wxCommandEvent& event);
|
||||
@ -50,6 +51,8 @@ private:
|
||||
void OnContinuousScanning(wxCommandEvent& event);
|
||||
void OnEnableSpeaker(wxCommandEvent& event);
|
||||
|
||||
void OnBackgroundInputChanged(wxCommandEvent& event);
|
||||
|
||||
std::map<wxWindowID, unsigned int> m_gc_port_from_choice_id;
|
||||
std::map<wxWindowID, unsigned int> m_gc_port_from_config_id;
|
||||
std::array<wxButton*, 4> m_gc_port_configure_button;
|
||||
@ -74,4 +77,6 @@ private:
|
||||
wxButton* m_refresh_wm_button;
|
||||
wxStaticText* m_unsupported_bt_text;
|
||||
wxCheckBox* m_enable_speaker_data;
|
||||
|
||||
wxCheckBox* m_background_input_checkbox;
|
||||
};
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "Core/HW/Wiimote.h"
|
||||
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
|
||||
|
||||
#include "InputCommon/ControllerEmu/Setting/BackgroundInputSetting.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/BooleanSetting.h"
|
||||
#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user