diff --git a/source/duke3d/src/config.cpp b/source/duke3d/src/config.cpp index 130786685..1ac425625 100644 --- a/source/duke3d/src/config.cpp +++ b/source/duke3d/src/config.cpp @@ -618,6 +618,9 @@ static void CONFIG_SetGameControllerAxesModern() { GAMECONTROLLER_AXIS_RIGHTY, analog_lookingupanddown }, }; + CONFIG_SetJoystickAnalogAxisScale(GAMECONTROLLER_AXIS_RIGHTX, 32768+16384); + CONFIG_SetJoystickAnalogAxisScale(GAMECONTROLLER_AXIS_RIGHTY, 32768+16384); + for (auto const & analogAxis : analogAxes) analogAxis.apply(); } @@ -630,29 +633,36 @@ void CONFIG_SetGameControllerDefaultsStandard() static GameControllerButtonSetting const buttons[] = { { GAMECONTROLLER_BUTTON_A, gamefunc_Jump }, - { GAMECONTROLLER_BUTTON_X, gamefunc_Open }, - { GAMECONTROLLER_BUTTON_Y, gamefunc_Quick_Kick }, + { GAMECONTROLLER_BUTTON_B, gamefunc_Crouch_Toggle }, { GAMECONTROLLER_BUTTON_BACK, gamefunc_Map }, { GAMECONTROLLER_BUTTON_LEFTSTICK, gamefunc_Run }, - { GAMECONTROLLER_BUTTON_RIGHTSTICK, gamefunc_Crouch }, + { GAMECONTROLLER_BUTTON_RIGHTSTICK, gamefunc_Quick_Kick }, { GAMECONTROLLER_BUTTON_LEFTSHOULDER, gamefunc_Crouch }, { GAMECONTROLLER_BUTTON_RIGHTSHOULDER, gamefunc_Jump }, { GAMECONTROLLER_BUTTON_DPAD_UP, gamefunc_Previous_Weapon }, { GAMECONTROLLER_BUTTON_DPAD_DOWN, gamefunc_Next_Weapon }, }; - static GameControllerButtonSetting const dukebuttons[] = + static GameControllerButtonSetting const buttonsDuke[] = { - { GAMECONTROLLER_BUTTON_B, gamefunc_Inventory }, + { GAMECONTROLLER_BUTTON_X, gamefunc_Open }, + { GAMECONTROLLER_BUTTON_Y, gamefunc_Inventory }, { GAMECONTROLLER_BUTTON_DPAD_LEFT, gamefunc_Inventory_Left }, { GAMECONTROLLER_BUTTON_DPAD_RIGHT, gamefunc_Inventory_Right }, }; - static GameControllerButtonSetting const furybuttons[] = + static GameControllerButtonSetting const buttonsFury[] = { - { GAMECONTROLLER_BUTTON_B, gamefunc_Steroids }, + { GAMECONTROLLER_BUTTON_X, gamefunc_Steroids }, // Reload + { GAMECONTROLLER_BUTTON_Y, gamefunc_Open }, { GAMECONTROLLER_BUTTON_DPAD_LEFT, gamefunc_MedKit }, - { GAMECONTROLLER_BUTTON_DPAD_RIGHT, gamefunc_NightVision }, + { GAMECONTROLLER_BUTTON_DPAD_RIGHT, gamefunc_NightVision }, // Radar + }; + + static GameControllerDigitalAxisSetting const digitalAxes[] = + { + { GAMECONTROLLER_AXIS_TRIGGERLEFT, 1, gamefunc_Alt_Fire }, + { GAMECONTROLLER_AXIS_TRIGGERRIGHT, 1, gamefunc_Fire }, }; for (auto const & button : buttons) @@ -660,21 +670,15 @@ void CONFIG_SetGameControllerDefaultsStandard() if (FURY) { - for (auto const & button : furybuttons) + for (auto const & button : buttonsFury) button.apply(); } else { - for (auto const & button : dukebuttons) + for (auto const & button : buttonsDuke) button.apply(); } - static GameControllerDigitalAxisSetting const digitalAxes[] = - { - { GAMECONTROLLER_AXIS_TRIGGERLEFT, 1, gamefunc_Alt_Fire }, - { GAMECONTROLLER_AXIS_TRIGGERRIGHT, 1, gamefunc_Fire }, - }; - for (auto const & digitalAxis : digitalAxes) digitalAxis.apply(); } @@ -687,8 +691,8 @@ void CONFIG_SetGameControllerDefaultsPro() static GameControllerButtonSetting const buttons[] = { { GAMECONTROLLER_BUTTON_A, gamefunc_Open }, - { GAMECONTROLLER_BUTTON_B, gamefunc_Quick_Kick }, - { GAMECONTROLLER_BUTTON_Y, gamefunc_Third_Person_View }, + { GAMECONTROLLER_BUTTON_B, gamefunc_Third_Person_View }, + { GAMECONTROLLER_BUTTON_Y, gamefunc_Quick_Kick }, { GAMECONTROLLER_BUTTON_BACK, gamefunc_Map }, { GAMECONTROLLER_BUTTON_LEFTSTICK, gamefunc_Run }, { GAMECONTROLLER_BUTTON_RIGHTSTICK, gamefunc_Crouch }, @@ -696,7 +700,7 @@ void CONFIG_SetGameControllerDefaultsPro() { GAMECONTROLLER_BUTTON_DPAD_DOWN, gamefunc_Next_Weapon }, }; - static GameControllerButtonSetting const dukebuttons[] = + static GameControllerButtonSetting const buttonsDuke[] = { { GAMECONTROLLER_BUTTON_X, gamefunc_Inventory }, { GAMECONTROLLER_BUTTON_LEFTSHOULDER, gamefunc_Previous_Weapon }, @@ -705,13 +709,19 @@ void CONFIG_SetGameControllerDefaultsPro() { GAMECONTROLLER_BUTTON_DPAD_RIGHT, gamefunc_Inventory_Right }, }; - static GameControllerButtonSetting const furybuttons[] = + static GameControllerButtonSetting const buttonsFury[] = { - { GAMECONTROLLER_BUTTON_X, gamefunc_Steroids }, + { GAMECONTROLLER_BUTTON_X, gamefunc_Steroids }, // Reload { GAMECONTROLLER_BUTTON_LEFTSHOULDER, gamefunc_Crouch }, { GAMECONTROLLER_BUTTON_RIGHTSHOULDER, gamefunc_Alt_Fire }, { GAMECONTROLLER_BUTTON_DPAD_LEFT, gamefunc_MedKit }, - { GAMECONTROLLER_BUTTON_DPAD_RIGHT, gamefunc_NightVision }, + { GAMECONTROLLER_BUTTON_DPAD_RIGHT, gamefunc_NightVision }, // Radar + }; + + static GameControllerDigitalAxisSetting const digitalAxes[] = + { + { GAMECONTROLLER_AXIS_TRIGGERLEFT, 1, gamefunc_Jump }, + { GAMECONTROLLER_AXIS_TRIGGERRIGHT, 1, gamefunc_Fire }, }; for (auto const & button : buttons) @@ -719,21 +729,15 @@ void CONFIG_SetGameControllerDefaultsPro() if (FURY) { - for (auto const & button : furybuttons) + for (auto const & button : buttonsFury) button.apply(); } else { - for (auto const & button : dukebuttons) + for (auto const & button : buttonsDuke) button.apply(); } - static GameControllerDigitalAxisSetting const digitalAxes[] = - { - { GAMECONTROLLER_AXIS_TRIGGERLEFT, 1, gamefunc_Jump }, - { GAMECONTROLLER_AXIS_TRIGGERRIGHT, 1, gamefunc_Fire }, - }; - for (auto const & digitalAxis : digitalAxes) digitalAxis.apply(); }