mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-11 04:31:35 -10:00
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.
38 lines
967 B
C
38 lines
967 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_RUMBLE_H__
|
|
#define __JOY_RUMBLE_H__
|
|
|
|
#include "globalincs/pstypes.h"
|
|
|
|
bool joy_rumble_init();
|
|
void joy_rumble_shutdown();
|
|
void joy_rumble_set_gain(int gain);
|
|
void joy_rumble_stop_effects();
|
|
void joy_rumble_mission_init(vec3d *v);
|
|
void joy_rumble_play_vector_effect(vec3d *v, float scaler);
|
|
void joy_rumble_play_dir_effect(float x, float y);
|
|
void joy_rumble_play_primary_shoot(int gain);
|
|
void joy_rumble_play_secondary_shoot(int gain);
|
|
void joy_rumble_adjust_handling(int speed);
|
|
void joy_rumble_docked();
|
|
void joy_rumble_play_reload_effect();
|
|
void joy_rumble_afterburn_on();
|
|
void joy_rumble_afterburn_off();
|
|
void joy_rumble_explode();
|
|
void joy_rumble_fly_by(int mag);
|
|
void joy_rumble_deathroll();
|
|
|
|
#endif
|
|
|
|
|