Indentation and unused code cleanup
This commit is contained in:
parent
f1f64867b6
commit
2b5f278754
2 changed files with 43 additions and 67 deletions
|
@ -821,7 +821,6 @@ static int init_joystick(void)
|
|||
fill_blank_controller();
|
||||
host_input_buttons[cpt] = default_controller_map;
|
||||
|
||||
|
||||
//printf("Retroarch search for: >>%s<<\n",joystick_name[cpt]);
|
||||
|
||||
host_input_buttons[cpt].is_retroarch = true;
|
||||
|
@ -875,18 +874,18 @@ static int init_joystick(void)
|
|||
host_input_buttons[cpt].number_of_hats = find_retroarch("count_hats", control_config, host_input_buttons[cpt]);
|
||||
|
||||
// invert on axes
|
||||
host_input_buttons[cpt].lstick_axis_y_invert = find_retroarch_polarity("input_down_axis",control_config);
|
||||
if (host_input_buttons[cpt].lstick_axis_y_invert == false)
|
||||
host_input_buttons[cpt].lstick_axis_y_invert = find_retroarch_polarity("input_l_y_plus_axis",control_config);
|
||||
host_input_buttons[cpt].lstick_axis_y_invert = find_retroarch_polarity("input_down_axis", control_config);
|
||||
if (!host_input_buttons[cpt].lstick_axis_y_invert)
|
||||
host_input_buttons[cpt].lstick_axis_y_invert = find_retroarch_polarity("input_l_y_plus_axis", control_config);
|
||||
|
||||
host_input_buttons[cpt].lstick_axis_x_invert = find_retroarch_polarity("input_right_axis",control_config);
|
||||
if (host_input_buttons[cpt].lstick_axis_x_invert == false)
|
||||
host_input_buttons[cpt].lstick_axis_x_invert = find_retroarch_polarity("input_l_x_plus_axis",control_config);
|
||||
host_input_buttons[cpt].lstick_axis_x_invert = find_retroarch_polarity("input_right_axis", control_config);
|
||||
if (!host_input_buttons[cpt].lstick_axis_x_invert)
|
||||
host_input_buttons[cpt].lstick_axis_x_invert = find_retroarch_polarity("input_l_x_plus_axis", control_config);
|
||||
|
||||
host_input_buttons[cpt].rstick_axis_x_invert = find_retroarch_polarity("input_r_x_plus_axis",control_config);
|
||||
host_input_buttons[cpt].rstick_axis_y_invert = find_retroarch_polarity("input_r_y_plus_axis",control_config);
|
||||
host_input_buttons[cpt].rstick_axis_x_invert = find_retroarch_polarity("input_r_x_plus_axis", control_config);
|
||||
host_input_buttons[cpt].rstick_axis_y_invert = find_retroarch_polarity("input_r_y_plus_axis", control_config);
|
||||
|
||||
// i'll just leave this here for when we have a working debug logging
|
||||
//i'll just leave this here for when we have a working debug logging
|
||||
// printf("invert left y axis: %d\n",host_input_buttons[cpt].lstick_axis_y_invert);
|
||||
// printf("invert left x axis: %d\n",host_input_buttons[cpt].lstick_axis_x_invert);
|
||||
// printf("invert right y axis: %d\n",host_input_buttons[cpt].rstick_axis_y_invert);
|
||||
|
@ -1353,14 +1352,11 @@ int input_get_default_joystick(struct uae_input_device* uid, const int num, int
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
// ASSIGN ALL INPUT EVENT ACTIONS, EITHER CUSTOM OR DEFAULT
|
||||
//
|
||||
// set up a temporary control layout/ called 'thismap'
|
||||
struct joypad_map_layout thismap[4];
|
||||
|
||||
|
||||
// here, we will fill thismap with defaults, if a custom value is not set.
|
||||
// this will do a lot of the 'logic' of the original code.
|
||||
|
||||
|
|
|
@ -160,39 +160,22 @@ public:
|
|||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optPort0)
|
||||
{
|
||||
SelectedPort = 0;
|
||||
}
|
||||
else if (actionEvent.getSource() == optPort1)
|
||||
{
|
||||
SelectedPort = 1;
|
||||
}
|
||||
else if (actionEvent.getSource() == optPort2)
|
||||
{
|
||||
SelectedPort = 2;
|
||||
}
|
||||
else if (actionEvent.getSource() == optPort3)
|
||||
{
|
||||
SelectedPort = 3;
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == optMultiNone)
|
||||
{
|
||||
SelectedFunction = 0;
|
||||
}
|
||||
else if (actionEvent.getSource() == optMultiSelect)
|
||||
{
|
||||
SelectedFunction = 1;
|
||||
}
|
||||
else if (actionEvent.getSource() == optMultiLeft)
|
||||
{
|
||||
SelectedFunction = 2;
|
||||
}
|
||||
else if (actionEvent.getSource() == optMultiRight)
|
||||
{
|
||||
SelectedFunction = 3;
|
||||
}
|
||||
|
||||
|
||||
else if (actionEvent.getSource() == chkAnalogRemap)
|
||||
changed_prefs.input_analog_remap = chkAnalogRemap->isSelected();
|
||||
|
@ -203,7 +186,6 @@ public:
|
|||
|
||||
static GroupActionListener* grpActionListener;
|
||||
|
||||
|
||||
class CustomActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
|
@ -330,7 +312,6 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
// and here, we will scroll through the custom-map and
|
||||
// push it into the currprefs config file
|
||||
|
||||
|
@ -511,10 +492,9 @@ void ExitPanelCustom()
|
|||
for (auto & i : lblCustomAction)
|
||||
{
|
||||
delete i;
|
||||
// delete cboCustomAction[i];
|
||||
//delete cboCustomAction[i];
|
||||
}
|
||||
|
||||
|
||||
delete lblPortInput;
|
||||
delete txtPortInput;
|
||||
delete lblRetroarch;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue