Skip to content

Commit

Permalink
Increase default impulse trigger strength modifier to 0.75x, and prop…
Browse files Browse the repository at this point in the history
…erly handle the case where setVibration (...) has zero trigger data
  • Loading branch information
Kaldaien committed Nov 30, 2024
1 parent 5b5f325 commit 48a9e5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/SpecialK/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1083,8 +1083,8 @@ struct sk_config_t
bool native_ps4 = false;
bool bt_input_only = false;
float low_battery_percent = 25.0f;
float impulse_strength_l = 0.33f;
float impulse_strength_r = 0.33f;
float impulse_strength_l = 0.75f;
float impulse_strength_r = 0.75f;

struct xinput_s {
unsigned
Expand Down
8 changes: 4 additions & 4 deletions src/input/game_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,11 +1004,11 @@ SK_IGameInputDevice::SetRumbleState (GameInputRumbleParams const *params) noexce

if (config.input.gamepad.xinput.emulate && (! config.input.gamepad.xinput.blackout_api) && (! SK_ImGui_WantGamepadCapture ()))
{
float left = (params_.lowFrequency + params_.leftTrigger * config.input.gamepad.impulse_strength_l);
float right = (params_.highFrequency + params_.rightTrigger * config.input.gamepad.impulse_strength_r);

if (params_.leftTrigger != 0 && params_.rightTrigger != 0)
if (params_.leftTrigger == 0 && params_.rightTrigger == 0)
{
const float left = params_.lowFrequency;
const float right = params_.highFrequency;

SK_XInput_PulseController ( 0, std::clamp (left, 0.0f, 1.0f),
std::clamp (right, 0.0f, 1.0f) );
}
Expand Down

0 comments on commit 48a9e5d

Please sign in to comment.