Open f4m4z opened 2 years ago
I think at some point it would be easier to just have a customizable script that gets compiled on startup, or when modified. As for now, you could try modifying transform.c to get the behavior you want. Here's a build with the following changes:
+#include <math.h>
static
void transform_get_state(struct settings *set, XINPUT_STATE *state)
{
transform_analog(&set->stick_l, &state->Gamepad.sThumbLX, &state->Gamepad.sThumbLY);
transform_analog(&set->stick_r, &state->Gamepad.sThumbRX, &state->Gamepad.sThumbRY);
transform_trigger(&set->trigger_l, &state->Gamepad.bLeftTrigger);
transform_trigger(&set->trigger_r, &state->Gamepad.bRightTrigger);
transform_remap(set->remap, state);
+ float radius = (float)sqrt(state->Gamepad.sThumbLX * state->Gamepad.sThumbLX + state->Gamepad.sThumbLY * state->Gamepad.sThumbLY) / 32767.0f;
+ state->Gamepad.wButtons |= radius > 0.95f ? 1 << 6 : 0;
}
First you calculate the position of the left stick in radial form and normalize it, then you just check if the stick is over 95% range, then set L3 as pressed (1 << 6 is L3).
i took a look inside transform.c myself earlier
i only know some very basic C programming but i guessed the transform_remap and the remap_buttons function of transform.c could've probably been worked with
anyways thank you for such a quick response and for making this awesome tool, a shame that in 2022 we don't yet have a proper controller macro tool
a shame that in 2022 we don't yet have a proper controller macro tool
Steam Input, reWASD, and DS4Windows can already do this
a shame that in 2022 we don't yet have a proper controller macro tool
Steam Input, reWASD, and DS4Windows can already do this
Steam Input requires me to have Steam open and running, reWASD is for Controller > KB/M mapping and DS4Windows is for PS4/Switch Controllers
there's nothing lightweight and standalone like Duranzo that currently exists afaik
For a long time I have been annoyed by having to press L3 everytime I need to sprint in a game
This tool has been a godsend to me as I can bind L3 to Left-Stick Forward and have my character automatically sprint without having to press L3 everytime
but during crouching/sneaking this causes my character to stand up and start sprinting
thus it would be very conveinent if there was threshold-based button mapping, so L3 is only triggered if LS is pushed 100% or 90% forward
(sorry for my poor english)