Skip to content

Commit

Permalink
Preliminary support for configurable trigger effects (vibration, weap…
Browse files Browse the repository at this point in the history
…on, feedback).
  • Loading branch information
Kaldaien committed Dec 1, 2024
1 parent 014b477 commit 0ad6a0a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/SpecialK/DLL_VERSION.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#define SK_YEAR 24
#define SK_MONTH 12
#define SK_DATE 1
#define SK_REV_N 3
#define SK_REV 3
#define SK_REV_N 4
#define SK_REV 4

#ifndef _A2
#define _A2(a) #a
Expand Down
14 changes: 14 additions & 0 deletions include/SpecialK/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,20 @@ struct sk_config_t
bool calc_latency = false;
} hid;

struct dualsense_s {
enum effect : int
{
Off = 0,
Feedback = 1,
Weapon = 2,
Vibration = 3
};
float trigger_strength_r = 1.0f;
float trigger_strength_l = 1.0f;
effect trigger_effect_r = Weapon;
effect trigger_effect_l = Weapon;
} dualsense;

bool blocks_screensaver = true;
} gamepad;

Expand Down
2 changes: 2 additions & 0 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3522,6 +3522,8 @@ auto DeclKeybind =

case SK_GAME_ID::ForzaHorizon5:
{
config.input.gamepad.dualsense.trigger_effect_l = config.input.gamepad.dualsense.Vibration;
config.input.gamepad.dualsense.trigger_effect_r = config.input.gamepad.dualsense.Vibration;
if (SK_IsInjected () && ((! PathFileExists (L"dxgi.dll")) &&
(! PathFileExists (L"d3d12.dll"))))
{
Expand Down
2 changes: 1 addition & 1 deletion src/input/game_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ GameInputCreate_Detour (IGameInput** gameInput)
{
SK_LOG_FIRST_CALL

IGameInput* pReal = nullptr;
IGameInput* pReal ;

HRESULT hr =
GameInputCreate_Original (&pReal);
Expand Down
2 changes: 1 addition & 1 deletion src/input/hid_reports/playstation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ SK_HID_PlayStationDevice::request_input_report (void)

SK_Thread_CreateEx ([](LPVOID pUser)->DWORD
{
SK_Thread_SetCurrentPriority (THREAD_PRIORITY_HIGHEST);
SK_Thread_SetCurrentPriority (THREAD_PRIORITY_TIME_CRITICAL);

SK_HID_PlayStationDevice* pDevice =
(SK_HID_PlayStationDevice *)pUser;
Expand Down

0 comments on commit 0ad6a0a

Please sign in to comment.