---
name: "al_upload_haptic_effect"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_upload_haptic_effect"
---

# al\_upload\_haptic\_effect(3)

Allegro 5 API

## NAME

al\_upload\_haptic\_effect - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  bool al_upload_haptic_effect(ALLEGRO_HAPTIC *hap,
     ALLEGRO_HAPTIC_EFFECT *effect, ALLEGRO_HAPTIC_EFFECT_ID *id)
  ```

## DESCRIPTION

Uploads the haptic effect to the device. The haptic effect must have been filled in completely and correctly. You must also pass in a pointer to a user allocated [ALLEGRO\_HAPTIC\_EFFECT\_ID(3)](/ALLEGRO_HAPTIC_EFFECT_ID/3.md). This `id` can be used to control playback of the effect. Returns true if the effect was successfully uploaded, false if not.

The function [al\_get\_max\_haptic\_effects(3)](/al_get_max_haptic_effects/3.md) returns how many effects can be uploaded to the device at the same time.

The same haptic effect can be uploaded several times, as long as care is taken to pass in a different [ALLEGRO\_HAPTIC\_EFFECT\_ID(3)](/ALLEGRO_HAPTIC_EFFECT_ID/3.md).

## SINCE

5\.1.8

*\[Unstable API\]:* Perhaps could be simplified due to limited support for all the exposed features across all of the platforms. Awaiting feedback from users.
