Fixes L and R triggers
This commit is contained in:
parent
c6249eb73e
commit
1be844406c
|
@ -377,7 +377,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
|
||||||
Y_cont = false;
|
Y_cont = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(((PadStatus->button & PAD_TRIGGER_L) != 0))
|
if(((PadStatus->triggerLeft) != 0))
|
||||||
{
|
{
|
||||||
wx_l_button->SetValue(true);
|
wx_l_button->SetValue(true);
|
||||||
L_cont = true;
|
L_cont = true;
|
||||||
|
@ -388,7 +388,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
|
||||||
L_cont = false;
|
L_cont = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(((PadStatus->button & PAD_TRIGGER_R) != 0))
|
if(((PadStatus->triggerRight) != 0))
|
||||||
{
|
{
|
||||||
wx_r_button->SetValue(true);
|
wx_r_button->SetValue(true);
|
||||||
R_cont = true;
|
R_cont = true;
|
||||||
|
@ -422,6 +422,19 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TASInputDlg::SetLandRTriggers()
|
||||||
|
{
|
||||||
|
if(wx_l_button->GetValue())
|
||||||
|
lTrig = 255;
|
||||||
|
else
|
||||||
|
lTrig = wx_r_s->GetValue();
|
||||||
|
|
||||||
|
if(wx_r_button->GetValue())
|
||||||
|
rTrig = 255;
|
||||||
|
else
|
||||||
|
rTrig = wx_r_s->GetValue();
|
||||||
|
}
|
||||||
|
|
||||||
void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
|
void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
|
||||||
{
|
{
|
||||||
if (!IsShown())
|
if (!IsShown())
|
||||||
|
@ -429,6 +442,7 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
|
||||||
|
|
||||||
//TODO:: Make this instant not when polled.
|
//TODO:: Make this instant not when polled.
|
||||||
GetKeyBoardInput(PadStatus);
|
GetKeyBoardInput(PadStatus);
|
||||||
|
SetLandRTriggers();
|
||||||
|
|
||||||
PadStatus->stickX = mainX;
|
PadStatus->stickX = mainX;
|
||||||
PadStatus->stickY = mainY;
|
PadStatus->stickY = mainY;
|
||||||
|
@ -489,16 +503,6 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
|
||||||
else
|
else
|
||||||
PadStatus->button &= ~PAD_BUTTON_Y;
|
PadStatus->button &= ~PAD_BUTTON_Y;
|
||||||
|
|
||||||
if(wx_l_button->IsChecked())
|
|
||||||
PadStatus->button |= PAD_TRIGGER_L;
|
|
||||||
else
|
|
||||||
PadStatus->button &= ~PAD_TRIGGER_L;
|
|
||||||
|
|
||||||
if(wx_r_button->IsChecked())
|
|
||||||
PadStatus->button |= PAD_TRIGGER_R;
|
|
||||||
else
|
|
||||||
PadStatus->button &= ~PAD_TRIGGER_R;
|
|
||||||
|
|
||||||
if(wx_z_button->IsChecked())
|
if(wx_z_button->IsChecked())
|
||||||
PadStatus->button |= PAD_TRIGGER_Z;
|
PadStatus->button |= PAD_TRIGGER_Z;
|
||||||
else
|
else
|
||||||
|
|
|
@ -46,6 +46,7 @@ class TASInputDlg : public wxDialog
|
||||||
void ButtonTurbo();
|
void ButtonTurbo();
|
||||||
void GetKeyBoardInput(SPADStatus *PadStatus);
|
void GetKeyBoardInput(SPADStatus *PadStatus);
|
||||||
bool TextBoxHasFocus();
|
bool TextBoxHasFocus();
|
||||||
|
void SetLandRTriggers();
|
||||||
bool TASInputDlgHasFocus();
|
bool TASInputDlgHasFocus();
|
||||||
|
|
||||||
wxBitmap CreateStickBitmap(int x, int y);
|
wxBitmap CreateStickBitmap(int x, int y);
|
||||||
|
|
Loading…
Reference in New Issue