mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 23:59:54 -06:00
Cleans up the TAS-Input code a little
This commit is contained in:
@ -884,99 +884,62 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
|
|||||||
{
|
{
|
||||||
case ID_A:
|
case ID_A:
|
||||||
placeholder = wx_a_button;
|
placeholder = wx_a_button;
|
||||||
|
A_turbo = !A_turbo;
|
||||||
if(A_turbo)
|
break;
|
||||||
A_turbo = false;
|
|
||||||
else
|
|
||||||
A_turbo = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_B:
|
case ID_B:
|
||||||
placeholder = wx_b_button;
|
placeholder = wx_b_button;
|
||||||
if(B_turbo)
|
B_turbo = !B_turbo;
|
||||||
B_turbo = false;
|
break;
|
||||||
else
|
|
||||||
B_turbo = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_X:
|
case ID_X:
|
||||||
placeholder = wx_x_button;
|
placeholder = wx_x_button;
|
||||||
if(X_turbo)
|
X_turbo = !X_turbo;
|
||||||
X_turbo = false;
|
|
||||||
else
|
|
||||||
X_turbo = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_Y:
|
case ID_Y:
|
||||||
placeholder = wx_y_button;
|
placeholder = wx_y_button;
|
||||||
if(Y_turbo)
|
Y_turbo = !Y_turbo;
|
||||||
Y_turbo = false;
|
break;
|
||||||
else
|
|
||||||
Y_turbo = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_Z:
|
case ID_Z:
|
||||||
placeholder = wx_z_button;
|
placeholder = wx_z_button;
|
||||||
if(Z_turbo)
|
Z_turbo = !Z_turbo;
|
||||||
Z_turbo = false;
|
|
||||||
else
|
|
||||||
Z_turbo = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_L:
|
case ID_L:
|
||||||
placeholder = wx_l_button;
|
placeholder = wx_l_button;
|
||||||
if(L_turbo)
|
L_turbo = !L_turbo;
|
||||||
L_turbo = false;
|
break;
|
||||||
else
|
|
||||||
L_turbo = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_R:
|
case ID_R:
|
||||||
placeholder = wx_r_button;
|
placeholder = wx_r_button;
|
||||||
if(R_turbo)
|
R_turbo = !R_turbo;
|
||||||
R_turbo = false;
|
|
||||||
else
|
|
||||||
R_turbo = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_START:
|
case ID_START:
|
||||||
placeholder = wx_start_button;
|
placeholder = wx_start_button;
|
||||||
if(START_turbo)
|
START_turbo = !START_turbo;
|
||||||
START_turbo = false;
|
|
||||||
else
|
|
||||||
START_turbo = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_UP:
|
case ID_UP:
|
||||||
placeholder = wx_start_button;
|
placeholder = wx_up_button;
|
||||||
if(DU_turbo)
|
DU_turbo = !DU_turbo;
|
||||||
DU_turbo = false;
|
|
||||||
else
|
|
||||||
DU_turbo = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_DOWN:
|
case ID_DOWN:
|
||||||
placeholder = wx_start_button;
|
placeholder = wx_down_button;
|
||||||
if(DD_turbo)
|
DD_turbo = !DD_turbo;
|
||||||
DD_turbo = false;
|
|
||||||
else
|
|
||||||
DD_turbo = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_LEFT:
|
case ID_LEFT:
|
||||||
placeholder = wx_left_button;
|
placeholder = wx_left_button;
|
||||||
if(DL_turbo)
|
DL_turbo = !DL_turbo;
|
||||||
DL_turbo = false;
|
|
||||||
else
|
|
||||||
DL_turbo = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_RIGHT:
|
case ID_RIGHT:
|
||||||
placeholder = wx_right_button;
|
placeholder = wx_right_button;
|
||||||
if(DR_turbo)
|
DR_turbo = !DR_turbo;
|
||||||
DR_turbo = false;
|
|
||||||
else
|
|
||||||
DR_turbo = true;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
@ -988,109 +951,61 @@ void TASInputDlg::ButtonTurbo()
|
|||||||
{
|
{
|
||||||
if(A_turbo)
|
if(A_turbo)
|
||||||
{
|
{
|
||||||
if(wx_a_button->GetValue())
|
wx_a_button->SetValue(!wx_a_button->GetValue());
|
||||||
wx_a_button->SetValue(false);
|
|
||||||
|
|
||||||
else
|
|
||||||
wx_a_button->SetValue(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(B_turbo)
|
if(B_turbo)
|
||||||
{
|
{
|
||||||
if(wx_b_button->GetValue())
|
wx_b_button->SetValue(!wx_b_button->GetValue());
|
||||||
wx_b_button->SetValue(false);
|
}
|
||||||
|
|
||||||
else
|
|
||||||
wx_b_button->SetValue(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(X_turbo)
|
if(X_turbo)
|
||||||
{
|
{
|
||||||
if(wx_x_button->GetValue())
|
wx_x_button->SetValue(!wx_x_button->GetValue());
|
||||||
wx_x_button->SetValue(false);
|
|
||||||
|
|
||||||
else
|
|
||||||
wx_x_button->SetValue(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Y_turbo)
|
if(Y_turbo)
|
||||||
{
|
{
|
||||||
if(wx_y_button->GetValue())
|
wx_y_button->SetValue(!wx_y_button->GetValue());
|
||||||
wx_y_button->SetValue(false);
|
|
||||||
|
|
||||||
else
|
|
||||||
wx_y_button->SetValue(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Z_turbo)
|
if(Z_turbo)
|
||||||
{
|
{
|
||||||
if(wx_z_button->GetValue())
|
wx_z_button->SetValue(!wx_z_button->GetValue());
|
||||||
wx_z_button->SetValue(false);
|
|
||||||
|
|
||||||
else
|
|
||||||
wx_z_button->SetValue(true);
|
|
||||||
}
|
}
|
||||||
if(L_turbo)
|
if(L_turbo)
|
||||||
{
|
{
|
||||||
if(wx_l_button->GetValue())
|
wx_l_button->SetValue(!wx_l_button->GetValue());
|
||||||
wx_l_button->SetValue(false);
|
}
|
||||||
|
|
||||||
else
|
|
||||||
wx_l_button->SetValue(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(R_turbo)
|
if(R_turbo)
|
||||||
{
|
{
|
||||||
if(wx_r_button->GetValue())
|
wx_r_button->SetValue(!wx_r_button->GetValue());
|
||||||
wx_r_button->SetValue(false);
|
|
||||||
|
|
||||||
else
|
|
||||||
wx_r_button->SetValue(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(START_turbo)
|
if(START_turbo)
|
||||||
{
|
{
|
||||||
if(wx_start_button->GetValue())
|
wx_start_button->SetValue(!wx_start_button->GetValue());
|
||||||
wx_start_button->SetValue(false);
|
}
|
||||||
|
|
||||||
else
|
|
||||||
wx_start_button->SetValue(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(DU_turbo)
|
if(DU_turbo)
|
||||||
{
|
{
|
||||||
if(wx_up_button->GetValue())
|
wx_up_button->SetValue(!wx_up_button->GetValue());
|
||||||
wx_up_button->SetValue(false);
|
}
|
||||||
|
|
||||||
else
|
|
||||||
wx_up_button->SetValue(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(DD_turbo)
|
if(DD_turbo)
|
||||||
{
|
{
|
||||||
if(wx_down_button->GetValue())
|
wx_down_button->SetValue(!wx_down_button->GetValue());
|
||||||
wx_down_button->SetValue(false);
|
}
|
||||||
|
|
||||||
else
|
|
||||||
wx_down_button->SetValue(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(DL_turbo)
|
if(DL_turbo)
|
||||||
{
|
{
|
||||||
if(wx_left_button->GetValue())
|
wx_left_button->SetValue(!wx_left_button->GetValue());
|
||||||
wx_left_button->SetValue(false);
|
|
||||||
|
|
||||||
else
|
|
||||||
wx_left_button->SetValue(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(DR_turbo)
|
if(DR_turbo)
|
||||||
{
|
{
|
||||||
if(wx_right_button->GetValue())
|
wx_right_button->SetValue(!wx_right_button->GetValue());
|
||||||
wx_right_button->SetValue(false);
|
|
||||||
|
|
||||||
else
|
|
||||||
wx_right_button->SetValue(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user