mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Njoy: added an option to choose what kind of analog filtering you want. it should be changeable when you choose to view advanced settings. this solved my analog/digital config problems i had and it *should* still work for those who had np with Jpeterson's change. i was told the wiimote had the same problem (makes sense) but im not sure if alot of ppl had that problem with their controllers so i have kept it as an ini changeable option only (set AdvancedMapFilter to True to use the same filtering as Njoy 0.3 does with AdvancedMapFilter enabled.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2180 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -83,6 +83,7 @@ BEGIN_EVENT_TABLE(ConfigBox,wxDialog)
|
||||
// Advanced settings
|
||||
EVT_COMBOBOX(IDCB_MAINSTICK_DIAGONAL, ConfigBox::ChangeSettings)
|
||||
EVT_CHECKBOX(IDCB_MAINSTICK_S_TO_C, ConfigBox::ChangeSettings)
|
||||
EVT_CHECKBOX(IDFILTER_SETTINGS, ConfigBox::ChangeSettings)
|
||||
|
||||
EVT_BUTTON(IDB_SHOULDER_L, ConfigBox::GetButtons)
|
||||
EVT_BUTTON(IDB_SHOULDER_R, ConfigBox::GetButtons)
|
||||
@ -520,7 +521,8 @@ void ConfigBox::UpdateGUI(int _notebookpage)
|
||||
m_Controller[_notebookpage]->FindItem(IDC_CONTROLTYPE)->Enable(Enabled);
|
||||
m_Controller[_notebookpage]->FindItem(IDC_TRIGGERTYPE)->Enable(Enabled && XInput);
|
||||
m_Controller[_notebookpage]->FindItem(IDCB_MAINSTICK_DIAGONAL)->Enable(Enabled);
|
||||
m_Controller[_notebookpage]->FindItem(IDCB_MAINSTICK_S_TO_C)->Enable(Enabled);
|
||||
m_Controller[_notebookpage]->FindItem(IDCB_MAINSTICK_S_TO_C)->Enable(Enabled);
|
||||
m_Controller[_notebookpage]->FindItem(IDFILTER_SETTINGS)->Enable(Enabled);
|
||||
#endif
|
||||
|
||||
// Replace the harder to understand -1 with "" for the sake of user friendliness
|
||||
@ -896,8 +898,10 @@ void ConfigBox::CreateGUIControls()
|
||||
"This will convert a square stick radius to a circle stick radius like the one that the actual GameCube pad produce."
|
||||
" That is also the input the games expect to see."
|
||||
));
|
||||
AdvancedMapFilter[i] = new wxCheckBox(m_Controller[i],IDFILTER_SETTINGS,_("Advanced Controller filtering"));
|
||||
|
||||
m_gStatusInSettings[i]->Add(m_CBS_to_C[i], 0, (wxALL), 4);
|
||||
m_gStatusInSettings[i]->Add(AdvancedMapFilter[i],0,(wxALL),4);
|
||||
m_gStatusInSettings[i]->Add(m_gStatusInSettingsH[i], 0, (wxLEFT | wxRIGHT | wxBOTTOM), 4);
|
||||
|
||||
m_gStatusInSettingsH[i]->Add(m_STDiagonal[i], 0, wxTOP, 3);
|
||||
|
@ -121,6 +121,7 @@ class ConfigBox : public wxDialog
|
||||
wxGridBagSizer * m_GBAdvancedMainStick[4];
|
||||
wxStaticText *m_TStatusIn[4], *m_TStatusOut[4], *m_STDiagonal[4];
|
||||
wxComboBox *m_CoBDiagonal[4]; wxCheckBox *m_CBS_to_C[4];
|
||||
wxCheckBox *AdvancedMapFilter[4];
|
||||
|
||||
wxStaticBoxSizer *m_gStatusTriggers[4]; // Triggers
|
||||
wxStaticText *m_TStatusTriggers[4];
|
||||
@ -219,7 +220,7 @@ class ConfigBox : public wxDialog
|
||||
IDT_STATUS_IN, IDT_STATUS_OUT,
|
||||
|
||||
// Advaced settings
|
||||
IDCB_MAINSTICK_DIAGONAL, IDCB_MAINSTICK_S_TO_C, IDT_MAINSTICK_DIAGONAL, IDT_TRIGGERS,
|
||||
IDCB_MAINSTICK_DIAGONAL, IDCB_MAINSTICK_S_TO_C, IDT_MAINSTICK_DIAGONAL, IDT_TRIGGERS,IDFILTER_SETTINGS,
|
||||
|
||||
// Timers
|
||||
IDTM_CONSTANT, IDTM_BUTTON,
|
||||
|
@ -79,6 +79,8 @@ void ConfigBox::UpdateGUIButtonMapping(int controller)
|
||||
m_Deadzone[controller]->SetSelection(PadMapping[controller].deadzone);
|
||||
m_CoBDiagonal[controller]->SetValue(wxString::FromAscii(PadMapping[controller].SDiagonal.c_str()));
|
||||
m_CBS_to_C[controller]->SetValue(PadMapping[controller].bSquareToCircle);
|
||||
AdvancedMapFilter[controller]->SetValue(PadMapping[controller].bFilterSettings);
|
||||
|
||||
|
||||
//LogMsg("m_TriggerType[%i] = %i\n", controller, PadMapping[controller].triggertype);
|
||||
|
||||
@ -122,6 +124,8 @@ void ConfigBox::SaveButtonMapping(int controller, bool DontChangeId, int FromSlo
|
||||
PadMapping[controller].deadzone = m_Deadzone[FromSlot]->GetSelection();
|
||||
PadMapping[controller].SDiagonal = m_CoBDiagonal[FromSlot]->GetLabel().mb_str();
|
||||
PadMapping[controller].bSquareToCircle = m_CBS_to_C[FromSlot]->IsChecked();
|
||||
PadMapping[controller].bFilterSettings = AdvancedMapFilter[FromSlot]->IsChecked();
|
||||
|
||||
|
||||
// The analog buttons
|
||||
m_JoyAnalogMainX[FromSlot]->GetValue().ToLong(&value); PadMapping[controller].axis[InputCommon::CTL_MAIN_X] = value; tmp.clear();
|
||||
@ -295,6 +299,8 @@ void ConfigBox::DoGetButtons(int GetId)
|
||||
bool Hat = (GetId >= IDB_DPAD_UP && GetId <= IDB_DPAD_RIGHT) // All DPads
|
||||
&& (PadMapping[Controller].controllertype == InputCommon::CTL_DPAD_HAT); // Not with the hat option defined
|
||||
|
||||
bool AdvancedMapFilter = PadMapping[Controller].bFilterSettings;
|
||||
|
||||
// Values used in this function
|
||||
char format[128];
|
||||
int Seconds = 4; // Seconds to wait for
|
||||
@ -349,7 +355,7 @@ void ConfigBox::DoGetButtons(int GetId)
|
||||
InputCommon::GetButton(
|
||||
joyinfo[PadID].joy, PadID, joyinfo[PadID].NumButtons, joyinfo[PadID].NumAxes, joyinfo[PadID].NumHats,
|
||||
g_Pressed, value, type, pressed, Succeed, Stop,
|
||||
LeftRight, Axis, XInput, Button, Hat);
|
||||
LeftRight, Axis, XInput, Button, Hat, AdvancedMapFilter);
|
||||
}
|
||||
// ========================= Check for keys
|
||||
|
||||
|
Reference in New Issue
Block a user