Updated source to match SDL function prototype style

This commit is contained in:
Sam Lantinga
2023-05-23 11:29:41 -07:00
parent 737aa881fa
commit ddbdd73258
173 changed files with 481 additions and 942 deletions

View File

@@ -85,8 +85,7 @@ int SDL_NumHaptics(void)
/*
* Gets the name of a Haptic device by index.
*/
const char *
SDL_HapticName(int device_index)
const char *SDL_HapticName(int device_index)
{
if ((device_index < 0) || (device_index >= SDL_NumHaptics())) {
SDL_SetError("Haptic: There are %d haptic devices available",
@@ -99,8 +98,7 @@ SDL_HapticName(int device_index)
/*
* Opens a Haptic device.
*/
SDL_Haptic *
SDL_HapticOpen(int device_index)
SDL_Haptic *SDL_HapticOpen(int device_index)
{
SDL_Haptic *haptic;
SDL_Haptic *hapticlist;
@@ -211,8 +209,7 @@ int SDL_MouseIsHaptic(void)
/*
* Returns the haptic device if mouse is haptic or NULL elsewise.
*/
SDL_Haptic *
SDL_HapticOpenFromMouse(void)
SDL_Haptic *SDL_HapticOpenFromMouse(void)
{
int device_index;
@@ -257,8 +254,7 @@ int SDL_JoystickIsHaptic(SDL_Joystick *joystick)
/*
* Opens a haptic device from a joystick.
*/
SDL_Haptic *
SDL_HapticOpenFromJoystick(SDL_Joystick *joystick)
SDL_Haptic *SDL_HapticOpenFromJoystick(SDL_Joystick *joystick)
{
SDL_Haptic *haptic;
SDL_Haptic *hapticlist;
@@ -415,8 +411,7 @@ int SDL_HapticNumEffectsPlaying(SDL_Haptic *haptic)
/*
* Returns supported effects by the device.
*/
unsigned int
SDL_HapticQuery(SDL_Haptic *haptic)
unsigned int SDL_HapticQuery(SDL_Haptic *haptic)
{
if (!ValidHaptic(haptic)) {
return 0; /* same as if no effects were supported */

View File

@@ -78,8 +78,7 @@ static SDL_hapticlist_item *HapticByDevId(int device_id)
return NULL;
}
const char *
SDL_SYS_HapticName(int index)
const char *SDL_SYS_HapticName(int index)
{
SDL_hapticlist_item *item = HapticByOrder(index);
if (item == NULL) {

View File

@@ -316,8 +316,7 @@ int MacHaptic_MaybeRemoveDevice(io_object_t device)
/*
* Return the name of a haptic device, does not need to be opened.
*/
const char *
SDL_SYS_HapticName(int index)
const char *SDL_SYS_HapticName(int index)
{
SDL_hapticlist_item *item;
item = HapticByDevIndex(index);

View File

@@ -39,8 +39,7 @@ int SDL_SYS_NumHaptics(void)
return 0;
}
const char *
SDL_SYS_HapticName(int index)
const char *SDL_SYS_HapticName(int index)
{
SDL_SYS_LogicError();
return NULL;

View File

@@ -344,8 +344,7 @@ static const char *SDL_SYS_HapticNameFromFD(int fd)
/*
* Return the name of a haptic device, does not need to be opened.
*/
const char *
SDL_SYS_HapticName(int index)
const char *SDL_SYS_HapticName(int index)
{
SDL_hapticlist_item *item;
int fd;

View File

@@ -130,8 +130,7 @@ static SDL_hapticlist_item *HapticByDevIndex(int device_index)
/*
* Return the name of a haptic device, does not need to be opened.
*/
const char *
SDL_SYS_HapticName(int index)
const char *SDL_SYS_HapticName(int index)
{
SDL_hapticlist_item *item = HapticByDevIndex(index);
return item->name;