Skip to content

Commit 4c2a7f4

Browse files
Merge pull request #46 from furious-programming/patch-5
Added missing imports of the "SDL_JoystickHasRumble" and "SDL_JoystickHasRumbleTriggers" functions.
2 parents c7a964a + a530c9d commit 4c2a7f4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

units/sdljoystick.inc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,16 @@ function SDL_JoystickGetBall(joystick: PSDL_Joystick; ball: cint32; dx: pcint32;
441441
function SDL_JoystickGetButton(joystick: PSDL_Joystick; button: cint32): cuint8; cdecl;
442442
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetButton' {$ENDIF} {$ENDIF};
443443

444+
{**
445+
* Query whether a joystick has rumble support.
446+
*
447+
* \param joystick The joystick to query
448+
*
449+
* \return SDL_TRUE if the joystick has rumble, SDL_FALSE otherwise.
450+
*}
451+
function SDL_JoystickHasRumble(joystick: PSDL_Joystick): TSDL_Bool; cdecl;
452+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickHasRumble' {$ENDIF} {$ENDIF};
453+
444454
{**
445455
* Start a rumble effect
446456
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
@@ -455,6 +465,16 @@ function SDL_JoystickGetButton(joystick: PSDL_Joystick; button: cint32): cuint8;
455465
function SDL_JoystickRumble(joystick: PSDL_Joystick; low_frequency_rumble: cuint16; high_frequency_rumble: cuint16; duration_ms: cuint32): cint32; cdecl;
456466
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickRumble' {$ENDIF} {$ENDIF};
457467

468+
{**
469+
* Query whether a joystick has rumble support on triggers.
470+
*
471+
* \param joystick The joystick to query
472+
*
473+
* \return SDL_TRUE if the joystick has trigger rumble, SDL_FALSE otherwise.
474+
*}
475+
function SDL_JoystickHasRumbleTriggers(joystick: PSDL_Joystick): TSDL_Bool; cdecl;
476+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickHasRumbleTriggers' {$ENDIF} {$ENDIF};
477+
458478
{**
459479
* Start a rumble effect in the joystick's triggers
460480
* Each call to this function cancels any previous trigger rumble effect, and calling it with 0 intensity stops any rumbling.

0 commit comments

Comments
 (0)