Files
fs2open.github.com/code/io/joy_haptic.h
T
Taylor Richards 6d3c2873c4 improve support for gamepads (#7655)
Use the SDL gamepad API to add full gamepad support. Adds rumble for supported
gamepads and changes the FF in-game options to take immediate effect instead
of requiring a restart.

Additionally this makes changes to allow gamepad triggers to be used as both
an axis and a button. This support is specific to gamepads since we can
explicitly identify the trigger with the API and act on it accordingly. FSO
control config doesn't currently support such an action directly however so
we have to hack it in just a bit. Due to this the control binding will show
the trigger axis name bound to a button control only while a gamepad is
connected, otherwise it shows a button name associated with the trigger.
2026-08-04 15:49:46 -04:00

37 lines
966 B
C

/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
#ifndef __JOY_HAPTIC_H__
#define __JOY_HAPTIC_H__
#include "globalincs/pstypes.h"
bool joy_haptic_init();
void joy_haptic_shutdown();
void joy_haptic_set_gain(int gain);
void joy_haptic_stop_effects();
void joy_haptic_mission_init(vec3d *v);
void joy_haptic_play_vector_effect(vec3d *v, float scaler);
void joy_haptic_play_dir_effect(float x, float y);
void joy_haptic_play_primary_shoot(int gain);
void joy_haptic_play_secondary_shoot(int gain);
void joy_haptic_adjust_handling(int speed);
void joy_haptic_docked();
void joy_haptic_play_reload_effect();
void joy_haptic_afterburn_on();
void joy_haptic_afterburn_off();
void joy_haptic_explode();
void joy_haptic_fly_by(int mag);
void joy_haptic_deathroll();
#endif