input: change default squircle value to 4000

The last squircle changes fixed a bug that caused the squircle to be too
large. This caused the previous default value of 8000 to be too circular
This commit is contained in:
Megamouse 2025-11-04 20:11:06 +01:00
parent 49548b913d
commit 2667d5de0f
9 changed files with 3 additions and 17 deletions

View file

@ -170,7 +170,7 @@ u16 PadHandlerBase::ConvertAxis(f32 value)
// The DS3, (and i think xbox controllers) give a 'square-ish' type response, so that the corners will give (almost)max x/y instead of the ~30x30 from a perfect circle
// using a simple scale/sensitivity increase would *work* although it eats a chunk of our usable range in exchange
// this might be the best for now, in practice it seems to push the corners to max of 20x20, with a squircle_factor of 8000
// this might be the best for now, in practice it seems to push the corners to max of 20x20, with a squircle_factor of ~4000
// This function assumes inX and inY is already in 0-255
void PadHandlerBase::ConvertToSquirclePoint(u16& inX, u16& inY, u32 squircle_factor)
{

View file

@ -88,8 +88,8 @@ struct cfg_pad final : cfg::node
cfg::uint<0, 1000000> rstick_anti_deadzone{ this, "Right Stick Anti-Deadzone", 0 };
cfg::uint<0, 1000000> ltriggerthreshold{ this, "Left Trigger Threshold", 0 };
cfg::uint<0, 1000000> rtriggerthreshold{ this, "Right Trigger Threshold", 0 };
cfg::uint<0, 1000000> lpadsquircling{ this, "Left Pad Squircling Factor", 8000 };
cfg::uint<0, 1000000> rpadsquircling{ this, "Right Pad Squircling Factor", 8000 };
cfg::uint<0, 1000000> lpadsquircling{ this, "Left Pad Squircling Factor", 4000 };
cfg::uint<0, 1000000> rpadsquircling{ this, "Right Pad Squircling Factor", 4000 };
cfg::uint<0, 255> colorR{ this, "Color Value R", 0 };
cfg::uint<0, 255> colorG{ this, "Color Value G", 0 };

View file

@ -189,8 +189,6 @@ void ds4_pad_handler::init_config(cfg_pad* cfg)
cfg->rstickdeadzone.def = 40; // between 0 and 255
cfg->ltriggerthreshold.def = 0; // between 0 and 255
cfg->rtriggerthreshold.def = 0; // between 0 and 255
cfg->lpadsquircling.def = 8000;
cfg->rpadsquircling.def = 8000;
// Set default color value
cfg->colorR.def = 0;

View file

@ -262,8 +262,6 @@ void dualsense_pad_handler::init_config(cfg_pad* cfg)
cfg->rstickdeadzone.def = 40; // between 0 and 255
cfg->ltriggerthreshold.def = 0; // between 0 and 255
cfg->rtriggerthreshold.def = 0; // between 0 and 255
cfg->lpadsquircling.def = 8000;
cfg->rpadsquircling.def = 8000;
// Set default color value
cfg->colorR.def = 0;

View file

@ -120,8 +120,6 @@ void evdev_joystick_handler::init_config(cfg_pad* cfg)
cfg->rstickdeadzone.def = 30; // between 0 and 255
cfg->ltriggerthreshold.def = 0; // between 0 and 255
cfg->rtriggerthreshold.def = 0; // between 0 and 255
cfg->lpadsquircling.def = 8000;
cfg->rpadsquircling.def = 8000;
// apply defaults
cfg->from_default();

View file

@ -68,8 +68,6 @@ void keyboard_pad_handler::init_config(cfg_pad* cfg)
cfg->rstickdeadzone.def = 0;
cfg->ltriggerthreshold.def = 0;
cfg->rtriggerthreshold.def = 0;
cfg->lpadsquircling.def = 8000;
cfg->rpadsquircling.def = 8000;
// apply defaults
cfg->from_default();

View file

@ -62,8 +62,6 @@ void mm_joystick_handler::init_config(cfg_pad* cfg)
cfg->rstickdeadzone.def = 0; // between 0 and 255
cfg->ltriggerthreshold.def = 0; // between 0 and 255
cfg->rtriggerthreshold.def = 0; // between 0 and 255
cfg->lpadsquircling.def = 8000;
cfg->rpadsquircling.def = 8000;
// apply defaults
cfg->from_default();

View file

@ -158,8 +158,6 @@ void sdl_pad_handler::init_config(cfg_pad* cfg)
cfg->rstickdeadzone.def = 8000; // between 0 and SDL_JOYSTICK_AXIS_MAX
cfg->ltriggerthreshold.def = 0; // between 0 and SDL_JOYSTICK_AXIS_MAX
cfg->rtriggerthreshold.def = 0; // between 0 and SDL_JOYSTICK_AXIS_MAX
cfg->lpadsquircling.def = 8000;
cfg->rpadsquircling.def = 8000;
// Set default color value
cfg->colorR.def = 0;

View file

@ -128,8 +128,6 @@ void xinput_pad_handler::init_config(cfg_pad* cfg)
cfg->rstickdeadzone.def = XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE; // between 0 and 32767
cfg->ltriggerthreshold.def = XINPUT_GAMEPAD_TRIGGER_THRESHOLD; // between 0 and 255
cfg->rtriggerthreshold.def = XINPUT_GAMEPAD_TRIGGER_THRESHOLD; // between 0 and 255
cfg->lpadsquircling.def = 8000;
cfg->rpadsquircling.def = 8000;
// apply defaults
cfg->from_default();